diff options
author | Carl Dong <contact@carldong.me> | 2020-09-16 17:09:38 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2021-02-18 14:49:06 -0500 |
commit | 3704433c4f5ecf9f196860b2ccecae0d2c8b5f6e (patch) | |
tree | 05507005150626b0188240390cfc849405edd270 /src/node/transaction.cpp | |
parent | 229bc37b5f18cffbc85efbad3b6e9047c6951e95 (diff) | |
download | bitcoin-3704433c4f5ecf9f196860b2ccecae0d2c8b5f6e.tar.xz |
scripted-diff: Invoke ::AcceptToMemoryPool with chainstate
-BEGIN VERIFY SCRIPT-
find_regex='\bAcceptToMemoryPool\(' \
&& git grep -l -E "$find_regex" -- src \
| grep -v '^src/validation\.\(cpp\|h\)$' \
| xargs sed -i -E 's@'"$find_regex"'@\0::ChainstateActive(), @g'
-END VERIFY SCRIPT-
Diffstat (limited to 'src/node/transaction.cpp')
-rw-r--r-- | src/node/transaction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node/transaction.cpp b/src/node/transaction.cpp index 6f5acf41e3..3b3fab7b6b 100644 --- a/src/node/transaction.cpp +++ b/src/node/transaction.cpp @@ -53,7 +53,7 @@ TransactionError BroadcastTransaction(NodeContext& node, const CTransactionRef t if (max_tx_fee > 0) { // First, call ATMP with test_accept and check the fee. If ATMP // fails here, return error immediately. - const MempoolAcceptResult result = AcceptToMemoryPool(*node.mempool, tx, false /* bypass_limits */, + const MempoolAcceptResult result = AcceptToMemoryPool(::ChainstateActive(), *node.mempool, tx, false /* bypass_limits */, true /* test_accept */); if (result.m_result_type != MempoolAcceptResult::ResultType::VALID) { return HandleATMPError(result.m_state, err_string); @@ -62,7 +62,7 @@ TransactionError BroadcastTransaction(NodeContext& node, const CTransactionRef t } } // Try to submit the transaction to the mempool. - const MempoolAcceptResult result = AcceptToMemoryPool(*node.mempool, tx, false /* bypass_limits */, + const MempoolAcceptResult result = AcceptToMemoryPool(::ChainstateActive(), *node.mempool, tx, false /* bypass_limits */, false /* test_accept */); if (result.m_result_type != MempoolAcceptResult::ResultType::VALID) { return HandleATMPError(result.m_state, err_string); |