diff options
author | John Newbery <john@johnnewbery.com> | 2021-09-27 17:47:21 +0100 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2021-11-03 14:34:41 +0000 |
commit | 2c64270bbe523ef87e7225c351464e7c716f0b3e (patch) | |
tree | 9a19b873baba2b2ec407dcd9cace410c37fc49f7 /src/rpc | |
parent | 92a3aeecf6a82e9cbc9fda11022b0548efd24d05 (diff) |
[refactor] Don't call AcceptToMemoryPool() from outside validation.cpp
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/rawtransaction.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 483717aa7a..dd9f78da0d 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -946,12 +946,13 @@ static RPCHelpMan testmempoolaccept() NodeContext& node = EnsureAnyNodeContext(request.context); CTxMemPool& mempool = EnsureMemPool(node); - CChainState& chainstate = EnsureChainman(node).ActiveChainstate(); + ChainstateManager& chainman = EnsureChainman(node); + CChainState& chainstate = chainman.ActiveChainstate(); const PackageMempoolAcceptResult package_result = [&] { LOCK(::cs_main); if (txns.size() > 1) return ProcessNewPackage(chainstate, mempool, txns, /* test_accept */ true); return PackageMempoolAcceptResult(txns[0]->GetWitnessHash(), - AcceptToMemoryPool(chainstate, mempool, txns[0], /* bypass_limits */ false, /* test_accept*/ true)); + chainman.ProcessTransaction(txns[0], /*test_accept=*/ true)); }(); UniValue rpc_result(UniValue::VARR); |