mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 02:33:24 -03:00
Merge bitcoin/bitcoin#29516: test: removes unnecessary check from validation_tests
6ee3997d03
test: removes unnecessary check from validation_tests (Sergi Delgado Segura) Pull request description: 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. Notice that a proper check to test the duplication case is added a few lines later, so this check is just meaningless and can be removed. Check https://github.com/bitcoin/bitcoin/pull/29412#discussion_r1506490281 for context. ACKs for top commit: maflcko: ACK6ee3997d03
dergoegge: utACK6ee3997d03
BrandonOdiwuor: utACK6ee3997d03
Tree-SHA512: e4627668091dda5f589e4c15edac39dc84aabc9b34b8f7fadbf512beb7111d5477e1b69567a34b4a657e48ba66dfb864db5ff37c9bbe3ff24cd32931b2dd89e6
This commit is contained in:
commit
9057598605
1 changed files with 0 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Reference in a new issue