From abccb2dd03ffb70a4757889d4b78ac8515226962 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Thu, 1 Aug 2024 19:16:06 +0000 Subject: [PATCH] test: drop genesis block from `blockheader_testnet3` bitcoin#25454 introduces a 10 point penalty for remitting more than MAX_BLOCKS_TO_ANNOUNCE unconnected block headers. Whether they are connected or not is determined by taking the first entry and running its hashPrevBlock through LookupBlockIndex. This new behaviour causes a test failure in p2p_dos_header_tree.py in Dash. Bitcoin doesn't face a test failure with this new behaviour as the first non-fork block in its test data is the dump for block 1 (00000000b873e7 9784647a6c82962c70d228557d24a747ea4d1b8bbe878e1206) but Dash uses block 0 (00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c), the genesis block. By definition of a genesis block, it has a hashPrevBlock of 0, which cannot be looked up. This trips the penalty. This doesn't cause any problems in the field as nobody is expected to ever broadcast the genesis block but it does cause a test failure for us. We need to correct that by getting rid of the genesis block from the test data. --- test/functional/data/blockheader_testnet3.hex | 1 - 1 file changed, 1 deletion(-) diff --git a/test/functional/data/blockheader_testnet3.hex b/test/functional/data/blockheader_testnet3.hex index 246ecd2ac4517..23c3356f300fc 100644 --- a/test/functional/data/blockheader_testnet3.hex +++ b/test/functional/data/blockheader_testnet3.hex @@ -1,6 +1,5 @@ fork:000000202cbcf83b62913d56f605c0e581a48872839428c92e5eb76cd7ad94bcaf0b0000c41f893a0d296b3b17730b42beb432aedc62473d0e6839910209d7f21af31a9bb9968054ffff0f1efd6b0e00 fork:000000201ed4bb12db90cfb7c68051d82f922b86b24c6a247de6168678c9a489ef020000e5968c16ea68f5f8d6ce1f1a987a7484986710c7cae2ac81ca1b5552f059aeceba968054f0ff0f1ef38f0c00 -010000000000000000000000000000000000000000000000000000000000000000000000c762a6567f3cc092f0684bb62b7e00a84890b990f07cc71a6bb58d64b98e02e0dee1e352f0ff0f1ec3c927e6 020000002cbcf83b62913d56f605c0e581a48872839428c92e5eb76cd7ad94bcaf0b00007f11dcce14075520e8f74cc4ddf092b4e26ebd23b8d8665a1ae5bfc41b58fdb4c3a95e53ffff0f1ef37a0000 02000000c108f2910109954fcdec2f962f1a9094be266cb6aeaae37b345e63247d0400004d29e4f9b2e05a9ac97dd5ae4128b3c0104bdc95aabaa566cc8eeb682e336d0dc4a95e53f0ff0f1e7b190000 02000000c2cc6fa3fe4d9fb73476bc3cf02248aa762af4960399232dbab4fa64620c000058968247522cc488db01996de610d6f3b8c348e748198dc528a305941211c71cc6a95e53f0ff0f1ecacf0000