test: exercise TransactionMerklePath with empty block; targets the MerkleComputation empty-leaves path that was only reached by fuzz tests
This commit is contained in:
1 parent
ca1ce52a0f
commit
ffcae82a68
1 file changed
+5
@@ -154,6 +154,11 @@ BOOST_AUTO_TEST_CASE(merkle_test_empty_block)
|
||||
|
||||
BOOST_CHECK_EQUAL(root.IsNull(), true);
|
||||
BOOST_CHECK_EQUAL(mutated, false);
|
||||
|
||||
// Verify TransactionMerklePath handles empty block correctly
|
||||
// This tests the early-return path in MerkleComputation
|
||||
std::vector<uint256> merkle_path = TransactionMerklePath(block, 0);
|
||||
BOOST_CHECK(merkle_path.empty());
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(merkle_test_oneTx_block)
|
||||
|
||||
Reference in new issue
Block a user