Skip to content

Commit

Permalink
Remove dangling evm queue pre-activation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jouzo committed Sep 6, 2023
1 parent 7dcf254 commit 6502cbd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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); }
Expand Down

0 comments on commit 6502cbd

Please sign in to comment.