mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
refactor: update MAX_DISCONNECTED_TX_POOL from kb to bytes
This commit is contained in:
parent
5b4478418b
commit
81dfeddea7
4 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue