From 6ee3997d03e456655e3c44abf1e15270c423ed41 Mon Sep 17 00:00:00 2001 From: Sergi Delgado Segura Date: Thu, 29 Feb 2024 09:54:47 -0500 Subject: [PATCH] test: removes unnecessary check from validation_tests An unnecessary check was added to the block mutation tests in #29412 where IsBlockMutated is returning true for the invalid reasons: we try to check mutation via transaction duplication, but the merkle root is not updated before the check, therefore the check fails because the provided root and the computed root differ, but not because the block contains the same transaction twice. The check is meaningless so it can be removed. --- src/test/validation_tests.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/validation_tests.cpp b/src/test/validation_tests.cpp index c6f6ac3bdb..93a884be6d 100644 --- a/src/test/validation_tests.cpp +++ b/src/test/validation_tests.cpp @@ -233,7 +233,6 @@ BOOST_AUTO_TEST_CASE(block_malleation) // Block with two transactions is mutated if any node is duplicate. { block.vtx[1] = block.vtx[0]; - BOOST_CHECK(is_mutated(block, /*check_witness_root=*/false)); HashWriter hasher; hasher.write(block.vtx[0]->GetHash()); hasher.write(block.vtx[1]->GetHash());