Skip to content

Commit 8bbd5a3

Browse files
committed
Fix finalizecompactblock filling in more found txs from mempool
1 parent e7b77b7 commit 8bbd5a3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rpc/mining.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,9 +1376,9 @@ UniValue finalizecompactblock(const JSONRPCRequest& request)
13761376
// Make mega-list
13771377
found.insert(found.end(), transactions.txn.begin(), transactions.txn.end());
13781378

1379-
// Now construct the final block!
1380-
LOCK(mempool.cs);
1381-
PartiallyDownloadedBlock partialBlock(&mempool);
1379+
// Now construct the final block! (use dummy mempool here, otherwise reconstruction may fail)
1380+
CTxMemPool dummy_pool;
1381+
PartiallyDownloadedBlock partialBlock(&dummy_pool);
13821382

13831383
const std::vector<std::pair<uint256, CTransactionRef>> dummy;
13841384
std::shared_ptr<CBlock> pblock = std::make_shared<CBlock>();

0 commit comments

Comments
 (0)