mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-06 21:20:57 +02:00
Avoid signed integer overflow when loading a mempool.dat file with a malformed time field
This commit is contained in:
parent
155bf91c3b
commit
ee11a412a5
@ -5084,7 +5084,7 @@ bool LoadMempool(CTxMemPool& pool)
|
|||||||
pool.PrioritiseTransaction(tx->GetHash(), amountdelta);
|
pool.PrioritiseTransaction(tx->GetHash(), amountdelta);
|
||||||
}
|
}
|
||||||
TxValidationState state;
|
TxValidationState state;
|
||||||
if (nTime + nExpiryTimeout > nNow) {
|
if (nTime > nNow - nExpiryTimeout) {
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
AcceptToMemoryPoolWithTime(chainparams, pool, state, tx, nTime,
|
AcceptToMemoryPoolWithTime(chainparams, pool, state, tx, nTime,
|
||||||
nullptr /* plTxnReplaced */, false /* bypass_limits */,
|
nullptr /* plTxnReplaced */, false /* bypass_limits */,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user