Skip to content

Commit 76e6645

Browse files
committed
fix: intermittent incorrect logging of CheckQueue for invalid blocks
It helps to return valid error during ConnectBlock instead no-named failure 2024-09-23T13:13:10Z ERROR: ConnectBlock: CheckQueue failed
1 parent 5fd84aa commit 76e6645

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/validation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2440,8 +2440,8 @@ bool CChainState::ConnectBlock(const CBlock& block, BlockValidationState& state,
24402440
// in multiple threads). Preallocate the vector size so a new allocation
24412441
// doesn't invalidate pointers into the vector, and keep txsdata in scope
24422442
// for as long as `control`.
2443-
CCheckQueueControl<CScriptCheck> control(fScriptChecks && g_parallel_script_checks ? &scriptcheckqueue : nullptr);
24442443
std::vector<PrecomputedTransactionData> txsdata(block.vtx.size());
2444+
CCheckQueueControl<CScriptCheck> control(fScriptChecks && g_parallel_script_checks ? &scriptcheckqueue : nullptr);
24452445

24462446
std::vector<int> prevheights;
24472447
CAmount nFees = 0;

0 commit comments

Comments
 (0)