Skip to content

Commit 57e9b56

Browse files
laanwjPastaPastaPasta
authored andcommitted
Merge bitcoin#24145: mempool: Clear vTxHashes when mapTx is cleared
9d65ad3 Clear vTxHashes when mapTx is cleared (Peter Bushnell) Pull request description: vTxHashes is a vector of all entries in mapTx, if you clear one you should clear the other, lest someone try to use the txiter in vTxHashes which would result in a segfault. ACKs for top commit: laanwj: Code review ACK 9d65ad3 Tree-SHA512: 6832755e43ab7f528b46817aeadcb6ffdc965b97f59ab96bb053dedbb7e68155ba3db52286355dca33b509237f80eda249760b26db493762bc50d8e2cef16d8f
1 parent fe56d9b commit 57e9b56

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/txmempool.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,7 @@ void CTxMemPool::removeExpiredAssetUnlock(int nBlockHeight)
10201020

10211021
void CTxMemPool::_clear()
10221022
{
1023+
vTxHashes.clear();
10231024
mapTx.clear();
10241025
mapNextTx.clear();
10251026
mapProTxAddresses.clear();

0 commit comments

Comments
 (0)