Fix finalizecompactblock filling in more found txs from mempool

This commit is contained in:
Gregory Sanders 2019-10-10 10:52:34 -04:00
parent e7b77b757d
commit 8bbd5a3aa8

View file

@ -1376,9 +1376,9 @@ UniValue finalizecompactblock(const JSONRPCRequest& request)
// Make mega-list // Make mega-list
found.insert(found.end(), transactions.txn.begin(), transactions.txn.end()); found.insert(found.end(), transactions.txn.begin(), transactions.txn.end());
// Now construct the final block! // Now construct the final block! (use dummy mempool here, otherwise reconstruction may fail)
LOCK(mempool.cs); CTxMemPool dummy_pool;
PartiallyDownloadedBlock partialBlock(&mempool); PartiallyDownloadedBlock partialBlock(&dummy_pool);
const std::vector<std::pair<uint256, CTransactionRef>> dummy; const std::vector<std::pair<uint256, CTransactionRef>> dummy;
std::shared_ptr<CBlock> pblock = std::make_shared<CBlock>(); std::shared_ptr<CBlock> pblock = std::make_shared<CBlock>();