mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-01 00:34:01 +02:00
rewrite DisconnectedBlockTransactions as a list + map
And encapsulate underlying data structures to avoid misuse. It's better to use stdlib instead of boost when we can achieve the same thing. Behavior change: the number returned by DynamicMemoryUsage for the same transactions is higher (due to change in usage or more accurate accounting), which effectively decreases the maximum amount of transactions kept for resubmission in a reorg. Co-authored-by: Cory Fields <cory-nospam-@coryfields.com>
This commit is contained in:
@@ -82,7 +82,7 @@ static void Reorg(const ReorgTxns& reorg)
|
||||
disconnectpool.removeForBlock(reorg.connected_txns_2);
|
||||
|
||||
// Sanity Check
|
||||
assert(disconnectpool.queuedTx.size() == BLOCK_VTX_COUNT - reorg.num_shared);
|
||||
assert(disconnectpool.size() == BLOCK_VTX_COUNT - reorg.num_shared);
|
||||
|
||||
disconnectpool.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user