Skip to content

Commit 4a1108c

Browse files
author
Claude Code
committed
validation: Fix cs_main lock scope in miner_tests
- Remove incorrect braces that prematurely released cs_main lock - Ensure TestPackageSelection and TestPrioritisedMining run under cs_main lock - Matches Bitcoin commit 9eaa5db structure exactly This fixes thread-safety analysis errors on macOS build.
1 parent 990a4e7 commit 4a1108c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/test/miner_tests.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -625,13 +625,11 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
625625
createAndProcessEmptyBlock();
626626
}
627627

628-
629-
{
630628
LOCK(cs_main);
631629

632630
TestBasicMining(scriptPubKey, txFirst, baseheight);
633-
}
634631

632+
m_node.chainman->ActiveChain().Tip()->nHeight--;
635633
SetMockTime(0);
636634

637635
TestPackageSelection(scriptPubKey, txFirst);

0 commit comments

Comments
 (0)