mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge #744: Fix finalizecompactblock filling in more found txs from mempool
cb90cdb7b Fix finalizecompactblock filling in more found txs from mempool (Gregory Sanders)
Pull request description:
If you instantiate `InitData` with a non-empty mempool, it may find "missing transactions", fill them in, and then the missing transaction index vector is now faulty and fails.
All data is already available to finish the block(or not in case of collision), just use given data.
Fixes intermittent feature_blocksign.py failure.
Tree-SHA512: d0d984b72daf710a1889c1e7032fe4fc81a26701d595441d9978bd6ab37f59b3a90df52a45df120007eb9465c6c4879807b6bea3602bb32ed1c05814d041c6fb
This commit is contained in:
commit
8fd1b52f9d
1 changed files with 3 additions and 3 deletions
|
|
@ -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<std::pair<uint256, CTransactionRef>> dummy;
|
||||
std::shared_ptr<CBlock> pblock = std::make_shared<CBlock>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue