From fa9f20b6477a206adf5089398803b45d1a114b6f Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sat, 16 May 2020 10:40:17 -0400 Subject: [PATCH] log: Properly log txs rejected from mempool --- src/net_processing.cpp | 8 +++++--- src/validation.cpp | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 7e9bb2f27c..fd8f05a46f 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1954,7 +1954,10 @@ void static ProcessOrphanTx(CConnman* connman, CTxMemPool& mempool, std::setGetId(), state.ToString()); diff --git a/src/validation.cpp b/src/validation.cpp index 8a454c8d1b..4a76605bb5 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -569,8 +569,9 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws) CAmount& nConflictingFees = ws.m_conflicting_fees; size_t& nConflictingSize = ws.m_conflicting_size; - if (!CheckTransaction(tx, state)) + if (!CheckTransaction(tx, state)) { return false; // state filled in by CheckTransaction + } // Coinbase is only valid in a block, not as a loose transaction if (tx.IsCoinBase()) @@ -680,7 +681,7 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws) CAmount nFees = 0; if (!Consensus::CheckTxInputs(tx, state, m_view, GetSpendHeight(m_view), nFees)) { - return error("%s: Consensus::CheckTxInputs: %s, %s", __func__, tx.GetHash().ToString(), state.ToString()); + return false; // state filled in by CheckTxInputs } // Check for non-standard pay-to-script-hash in inputs