From 6502cbd1540cc407e580f49981984fc8fe0cdad7 Mon Sep 17 00:00:00 2001 From: jouzo Date: Wed, 6 Sep 2023 23:12:26 +0100 Subject: [PATCH] Remove dangling evm queue pre-activation --- src/validation.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 91360040d4..2c515e5517 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -2937,6 +2937,8 @@ bool CChainState::ConnectBlock(const CBlock& block, CValidationState& state, CBl // Finalize items if (isEvmEnabledForBlock) { XResultThrowOnErr(evm_unsafe_try_commit_queue(result, evmQueueId)); + } else { + XResultThrowOnErr(evm_unsafe_try_remove_queue(result, evmQueueId)); } int64_t nTime5 = GetTimeMicros(); nTimeIndex += nTime5 - nTime4; @@ -3354,7 +3356,7 @@ bool CChainState::ConnectTip(CValidationState& state, const CChainParams& chainp auto r = XResultValue(evm_unsafe_try_create_queue(result)); if (!r) { return invalidStateReturn(state, pindexNew, mnview, 0); } uint64_t evmQueueId = *r; - + bool rv = ConnectBlock(blockConnecting, state, pindexNew, view, mnview, chainparams, rewardedAnchors, false, evmQueueId); GetMainSignals().BlockChecked(blockConnecting, state); if (!rv) { return invalidStateReturn(state, pindexNew, mnview, evmQueueId); }