diff options
author | ismaelsadeeq <ask4ismailsadiq@gmail.com> | 2023-09-25 13:00:52 +0100 |
---|---|---|
committer | ismaelsadeeq <ask4ismailsadiq@gmail.com> | 2023-10-13 14:25:37 +0100 |
commit | 81dfeddea70ae5feeaf79062585c2ff9f33c0ca3 (patch) | |
tree | 5300ff3ddeeed52557c1d261d3b54f98dab9dba4 /src/validation.cpp | |
parent | 5b4478418b24422885ae4d5c9a41a45455a72618 (diff) | |
download | bitcoin-81dfeddea70ae5feeaf79062585c2ff9f33c0ca3.tar.xz |
refactor: update `MAX_DISCONNECTED_TX_POOL` from kb to bytes
Diffstat (limited to 'src/validation.cpp')
-rw-r--r-- | src/validation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index 30b3dde74f..e97f6d261e 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -3058,7 +3058,7 @@ bool Chainstate::ActivateBestChainStep(BlockValidationState& state, CBlockIndex* // Disconnect active blocks which are no longer in the best chain. bool fBlocksDisconnected = false; - DisconnectedBlockTransactions disconnectpool{MAX_DISCONNECTED_TX_POOL_SIZE * 1000}; + DisconnectedBlockTransactions disconnectpool{MAX_DISCONNECTED_TX_POOL_BYTES}; while (m_chain.Tip() && m_chain.Tip() != pindexFork) { if (!DisconnectTip(state, &disconnectpool)) { // This is likely a fatal error, but keep the mempool consistent, @@ -3416,7 +3416,7 @@ bool Chainstate::InvalidateBlock(BlockValidationState& state, CBlockIndex* pinde // ActivateBestChain considers blocks already in m_chain // unconditionally valid already, so force disconnect away from it. - DisconnectedBlockTransactions disconnectpool{MAX_DISCONNECTED_TX_POOL_SIZE * 1000}; + DisconnectedBlockTransactions disconnectpool{MAX_DISCONNECTED_TX_POOL_BYTES}; bool ret = DisconnectTip(state, &disconnectpool); // DisconnectTip will add transactions to disconnectpool. // Adjust the mempool to be consistent with the new tip, adding |