From 8bbd5a3aa884cbdf2e84c5575071c3154b656a8b Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Thu, 10 Oct 2019 10:52:34 -0400 Subject: [PATCH] Fix finalizecompactblock filling in more found txs from mempool --- src/rpc/mining.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index f1d8ff9707..143bfcef85 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -1376,9 +1376,9 @@ UniValue finalizecompactblock(const JSONRPCRequest& request) // Make mega-list found.insert(found.end(), transactions.txn.begin(), transactions.txn.end()); - // Now construct the final block! - LOCK(mempool.cs); - PartiallyDownloadedBlock partialBlock(&mempool); + // Now construct the final block! (use dummy mempool here, otherwise reconstruction may fail) + CTxMemPool dummy_pool; + PartiallyDownloadedBlock partialBlock(&dummy_pool); const std::vector> dummy; std::shared_ptr pblock = std::make_shared();