diff options
-rw-r--r-- | contrib/verify-commits/allow-revsig-commits | 141 | ||||
-rw-r--r-- | doc/build-unix.md | 2 | ||||
-rwxr-xr-x | test/functional/feature_assumevalid.py | 1 | ||||
-rwxr-xr-x | test/functional/feature_bip68_sequence.py | 2 | ||||
-rwxr-xr-x | test/functional/feature_block.py | 1 | ||||
-rwxr-xr-x | test/functional/feature_csv_activation.py | 1 | ||||
-rwxr-xr-x | test/functional/feature_dersig.py | 4 | ||||
-rwxr-xr-x | test/functional/feature_nulldummy.py | 1 | ||||
-rwxr-xr-x | test/functional/feature_taproot.py | 2 | ||||
-rwxr-xr-x | test/functional/feature_txindex_compatibility.py | 92 | ||||
-rwxr-xr-x | test/functional/p2p_invalid_block.py | 4 | ||||
-rwxr-xr-x | test/functional/p2p_segwit.py | 2 | ||||
-rwxr-xr-x | test/functional/test_runner.py | 3 | ||||
-rwxr-xr-x | test/functional/wallet_bumpfee.py | 1 | ||||
-rwxr-xr-x | test/functional/wallet_resendwallettransactions.py | 1 |
15 files changed, 236 insertions, 22 deletions
diff --git a/contrib/verify-commits/allow-revsig-commits b/contrib/verify-commits/allow-revsig-commits index 3abf82e529..0bb299b8fa 100644 --- a/contrib/verify-commits/allow-revsig-commits +++ b/contrib/verify-commits/allow-revsig-commits @@ -502,3 +502,144 @@ e2bf830bb6c1bfa038c943dd6f5d92a406bd723f 0ad104190465d8d65c2344bbe10dcf3df025d86c 5c7df7022bcd360e6af00b9458b1a3fd54e1cc9a 59ad56851a342d2c62f6b38bf15002b23ab439e1 +d8cd7b137fb075616f31d2b43b85fa2e27ea7477 +655937ebcbf681ededf86b1f0f60aac45c73393d +abdfd2d0e3ebec7dbead89317ee9192189a35809 +e439aeb30c0439001a781c5979aec41e1fc2aa50 +b9b26d9c3615d15669ae0a049c1dede39a9e59a9 +fdf146f3293c487afdc4d6d9f6b64099aa8bd28a +16e3b175781caacee403a2dc40cd6c70448e12ef +b30c62d4b954df05bf404cfbeb5b728282201496 +b3f377daaa86cd7755a552fa3adfeb195835f58e +0a8f519a0626d7cd385114ce610d23215c051b3f +544f3234384b2f6c290e987ad18576e1b50d7db9 +91482e5bf22d283d32c9f83c8057f10971848107 +e754c6e33194e9ed69ba5350c5139b0423b645fe +dc1e54206d76e5fa378d28a18ae1fb2bcf714485 +b2863c0685a5c12f829095cbabaf26ccc49e46ec +b14db5abab405a708f0166293f1ea12222a6bf03 +8010ded6da56842c09b14665343cd189d7e08401 +d387507aeca652a5569825af65243536f2ce26ea +27bf14f6f3e0fb1f348f13c1b54fc6b67b3bef6e +f8d470e24606297dab95e30b1d39ff664fbda31d +b25a4c2284babdf1e8cf0ec3b1402200dd25f33f +1329ef1f00e4fad83937ddd8721d0292ccfe7808 +9a1ad2c5cbdfa3114d05df57103c34f72e087f26 +1e90862f5d0b5f7dcc18fb018b2bbaa323dcca1d +ad552a54c56a420be84b47154882c3e4c76f9bdd +90b1c7e5c50551f39d4983008d1d5ab3b085803e +d6b2235ca45e072961e25a35e6a159e97c9e556b +2643fa50869f22672cbc72ac497d9c30234075b8 +01f909828d126d5443bc28758f51781eccdf5848 +f54f3738c8ce839c413d7b6b719be2ff341536ca +418ae49ee1eac2c9d6cd4ba83c036a41f1afe922 +5a666428b0f11d62af2002bd54a45ff2f79f30cd +a07e8caa5d5000286604458e6887f57fec7fdcbb +8b262eb2d80bfa27ae8501078ce47bc1407e9c55 +5df84de583c900e00fef63bedaef32786f205a33 +4ba6da55743a55189164e29e45ac9e73a074d808 +88430cbab4dca36b6a867364cab319cde6a9ebca +e0f7515f5500968c86e5a9f4912d83d4abc5b2b9 +9b8b1079ddab64ac955766536c38d23dc57bc499 +af20f9b1d485582b8c8aa8294bac4f2c540246d2 +7be9a9a570c1140048f8781ced1111e1d930e517 +2bac3e484114c30548e286972525dd799dbd0a5b +df529dcc65e8037c5a3a3ad74545be294a770f07 +6acd8700bc0ee1d10207a362c1e07372ba274041 +ffc6e48b2983189dc0ce7de0a038e5329bc07b1b +252ae7111cbff09a4cbc5caee9e02b6ed3580476 +b3ecb7bab6074377d87c700bf0c5d351e5d3174f +d9fdac130a5ed1d96fcac6bb87c10bec9d596b17 +a07e8caa5d5000286604458e6887f57fec7fdcbb +8b262eb2d80bfa27ae8501078ce47bc1407e9c55 +5df84de583c900e00fef63bedaef32786f205a33 +4ba6da55743a55189164e29e45ac9e73a074d808 +5bea05bc1d17aa43cbdf3a3413241f8132790d93 +c17f11f7b43ad3bd9e242c67db1f3679558a0581 +5ea932a51083837cdd27715e10a3a0d5d553af24 +033c78671b91b12d589ebff6c5ede8d94d7500f8 +ef8a634358848847e006c43ce621bc17a612fd1f +ba216b5fa63e7e6cae847d1e3621f5c54840f898 +26fee4f6bd9aec62c6caa60683ad66574cf16aa6 +6ab0e4cf49549640b903bf5fce0e6035b8116397 +326a5652e0d25fdb60c337ef4f1c98a63e0748f0 +424be03305143cbe5da5d5adb54d73d3dc3747b6 +38c201f47c0bc388a05cdb35d6137150fa90193e +12ed800ab870e0fc527a84d6e4584b10c8d239f5 +aeed345c9bade5d52a3fbf0a943203f6c82e6344 +c6223b3daab0328ca742b1cc3c15e89e698630bb +877678710800a4d78afc12519424f232f1a583d3 +6c4fecfaf7beefad0d1c3f8520bf50bb515a0716 +98212745c8acb5cc4e688bbb3979bfd46b25f98a +b9bceaf1c081a84d9fcc680372614e797b168a9e +1afc22a7667a7a5c66b4b5d7f50832356dd5ec12 +3255d6347b1f9eccbec3d6d93d4a424087a3b35b +ec20f01ba0945a3113797ac98a6b3500e24603d4 +75b5643c47c3b382ed97a9f5e2bdc883a0f98709 +fee0d803fb55c8d85b5cd1ff69d799c5ad522e18 +565494619d809655fa94d274bb2202d25553e485 +ad6fce67b9bb6eee864c8431ad3291aebaa2e5d2 +99c7db8731cc77f143b52f544b3fdd93033ed20d +b4d03be3cac04da8b5d5fa17e29c5220b75d970b +ef37f2033c4ae104585cd980141262f95d33166e +5cfdda2503c995cdd563b1a2a29162ac298d173d +c5904e871479514b2e2e18b4fdbbe468c4e5ec8e +10b22e3141a603ec891d2cfc7100c29c7409aabe +afd2fca911c4a5e3a4d1f0993a226d40f250aff4 +505955052e60e0681865f3064e005ca0d3aa90bf +8fdd23a224ba236874ef662c4ca311b002dbcab3 +1c011ff430106b5f727f2eaa0f7f4883cd2122a3 +ec8a50b8d786a8cd1192e692ab19b46979add582 +f90603ac6d24f5263649675d51233f1fce8b2ecd +b7d6623c76e1468f2a93db5a3120580e2784d74a +66270a416edb1610f276124483feceef9cba93ff +e4fcbf797ed3b472d352ac3794ec82f581209c50 +479afa0f8486146a35f1fb96be1826061ecbcf23 +2a09a3891fde052a585dc019eea9fba26d42445d +90a002ea647dcea57a2ed4294eab77897168ba1d +30c21306c17165c3925fea4ac9d1a4763c6d2a99 +b3eb0d6485510f2bdf36d256ab60ce29b8213744 +efbcf2b1d5ff4ee7132eae9c9e203d2b875c545b +b33ca14f594e2cf2a16ef27778169deb7cc9f4dc +d636f3943d39ec893dab2d2546f77f3f2607769d +cafe24f039e117d53288387c2720f44f27deecd0 +de8db47b7ff351f3287c5efb85102ba8836058d6 +d76e84a21416ef77e78138e326d4d249454e79dc +7a74f88a26cf251ba36b26f604f1ac9940fd9c92 +1ad3d4e1261f4a444d982a1470c257c78233bda3 +8d9f45ea6a5e4220e44d34139438eea75a07530b +c98ebf1bfb29a8203b5090412afeb333384213cd +f18bb49547095020a30e81b648075bc7e707515c +76f268b9bd1b69eb7784c5324abbb67f3e395b97 +e801084decf4542d57cf5ddb95820643766a172a +be3e042c20e2f3449b7b55d1cab0a80b0c6f00af +400fdd08cc95f1e85afafd07ddd9c0bed11483ea +098b01dc58ff555c473ae58c92c34b03a77eda5f +7cc2c670e3d7cf26454ac8547a94ec2c8ca90b34 +1088b02f0ccd7358d2b7076bb9e122d59d502d02 +f94b7d5bfa911ea7125920589723ee63a3eec9f0 +b4b057a3e0712dd16b50cbcfe7d613e4413ffa1c +b40ceed98a112f4f0d07351ce07270d9ff2bf796 +4cb8757aae1ae31e5519d81e854f44ed062d9836 +f2f7e97e8cc24cf7a2b7954cb74ecfd0f91a95ad +ae786098bc58b1ca92f596a698b23aeade9cd2cd +c33652576ce21694b33a94832378f737dd6959fb +e317c0d19201ff75fa7afedf93a9d1cd2c560af2 +bee35299716cc72cb7d5bd4daa9fddca05c58378 +318ea50a1c2f612e750a93e36620dd0c4531e9cf +b6ee855b411ee9bc39f935d0da3298a773a2ed37 +daf3e7def7b9e5db7a32f5a20b5c4e09e3f0dd18 +bc64b5aa0fc543fe8fd3dbaec275f89df44dc409 +3f57c55dba6ef1fda2bdf6fd9abd8ca7eb6828e4 +431a548faaf51c7a5fc89b6e479187a1c0e29805 +e4bbd3d230f22401ba0a0a72c8ed41ee1bd098a0 +c45da32047cac54afc99cf9b8a539389c577ded1 +ab1f1d32469180b3d011e9625d67c86a22b55903 +a550f6e415fd8aec8c45d4704712a408c37ecd18 +c73af5416b66f09cec0eb106f5a10f9bb6ef9cb1 +a077a90da88f12d9f10c8b85840bdb847a98b0a0 +c5e9e428a9198c8c4076f239b5eaa8dc95e7985b +b7365f0545b1a6862e3277b2b2139ee0d5aee1cf +4bd0e9b90a39c5c6a016b83882ae44cb4d28f1f8 +7438ceac716fdfe6621728c05e718eaa89dd89aa +4e3efd47e0d50c6cd1dc81ccc9669a5b2658f495 diff --git a/doc/build-unix.md b/doc/build-unix.md index 5d9e5ec2f4..f50a9b23c0 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -312,7 +312,7 @@ This example lists the steps necessary to setup and build a command line only, n Note: Enabling wallet support requires either compiling against a Berkeley DB newer than 4.8 (package `db`) using `--with-incompatible-bdb`, or building and depending on a local version of Berkeley DB 4.8. The readily available Arch Linux packages are currently built using -`--with-incompatible-bdb` according to the [PKGBUILD](https://projects.archlinux.org/svntogit/community.git/tree/bitcoin/trunk/PKGBUILD). +`--with-incompatible-bdb` according to the [PKGBUILD](https://github.com/archlinux/svntogit-community/blob/packages/bitcoin/trunk/PKGBUILD). As mentioned above, when maintaining portability of the wallet between the standard Bitcoin Core distributions and independently built node software is desired, Berkeley DB 4.8 must be used. diff --git a/test/functional/feature_assumevalid.py b/test/functional/feature_assumevalid.py index a4480307a7..66092de317 100755 --- a/test/functional/feature_assumevalid.py +++ b/test/functional/feature_assumevalid.py @@ -126,7 +126,6 @@ class AssumeValidTest(BitcoinTestFramework): self.block_time += 1 block102.vtx.extend([tx]) block102.hashMerkleRoot = block102.calc_merkle_root() - block102.rehash() block102.solve() self.blocks.append(block102) self.tip = block102.sha256 diff --git a/test/functional/feature_bip68_sequence.py b/test/functional/feature_bip68_sequence.py index d962b622fe..0c29a782b1 100755 --- a/test/functional/feature_bip68_sequence.py +++ b/test/functional/feature_bip68_sequence.py @@ -335,7 +335,6 @@ class BIP68Test(BitcoinTestFramework): # tx3 to be removed. for i in range(2): block = create_block(tmpl=tmpl, ntime=cur_time) - block.rehash() block.solve() tip = block.sha256 assert_equal(None if i == 1 else 'inconclusive', self.nodes[0].submitblock(block.serialize().hex())) @@ -392,7 +391,6 @@ class BIP68Test(BitcoinTestFramework): block = create_block(tmpl=self.nodes[0].getblocktemplate(NORMAL_GBT_REQUEST_PARAMS)) block.vtx.extend([tx1, tx2, tx3]) block.hashMerkleRoot = block.calc_merkle_root() - block.rehash() add_witness_commitment(block) block.solve() diff --git a/test/functional/feature_block.py b/test/functional/feature_block.py index b06ea8542b..7831984b81 100755 --- a/test/functional/feature_block.py +++ b/test/functional/feature_block.py @@ -612,7 +612,6 @@ class FullBlockTest(BitcoinTestFramework): b45.nBits = 0x207fffff b45.vtx.append(non_coinbase) b45.hashMerkleRoot = b45.calc_merkle_root() - b45.calc_sha256() b45.solve() self.block_heights[b45.sha256] = self.block_heights[self.tip.sha256] + 1 self.tip = b45 diff --git a/test/functional/feature_csv_activation.py b/test/functional/feature_csv_activation.py index 5255b13bd1..c4e2252487 100755 --- a/test/functional/feature_csv_activation.py +++ b/test/functional/feature_csv_activation.py @@ -177,7 +177,6 @@ class BIP68_112_113Test(BitcoinTestFramework): block.nVersion = 4 block.vtx.extend(txs) block.hashMerkleRoot = block.calc_merkle_root() - block.rehash() block.solve() return block diff --git a/test/functional/feature_dersig.py b/test/functional/feature_dersig.py index 28aff1f2f9..eba3809d24 100755 --- a/test/functional/feature_dersig.py +++ b/test/functional/feature_dersig.py @@ -88,7 +88,6 @@ class BIP66Test(BitcoinTestFramework): block = create_block(int(tip, 16), create_coinbase(DERSIG_HEIGHT - 1), block_time) block.vtx.append(spendtx) block.hashMerkleRoot = block.calc_merkle_root() - block.rehash() block.solve() assert_equal(self.nodes[0].getblockcount(), DERSIG_HEIGHT - 2) @@ -103,7 +102,6 @@ class BIP66Test(BitcoinTestFramework): block_time += 1 block = create_block(tip, create_coinbase(DERSIG_HEIGHT), block_time) block.nVersion = 2 - block.rehash() block.solve() with self.nodes[0].assert_debug_log(expected_msgs=[f'{block.hash}, bad-version(0x00000002)']): @@ -133,7 +131,6 @@ class BIP66Test(BitcoinTestFramework): # Now we verify that a block with this transaction is also invalid. block.vtx.append(spendtx) block.hashMerkleRoot = block.calc_merkle_root() - block.rehash() block.solve() with self.nodes[0].assert_debug_log(expected_msgs=[f'CheckInputScripts on {block.vtx[-1].hash} failed with non-mandatory-script-verify-flag (Non-canonical DER signature)']): @@ -144,7 +141,6 @@ class BIP66Test(BitcoinTestFramework): self.log.info("Test that a block with a DERSIG-compliant transaction is accepted") block.vtx[1] = self.create_tx(self.coinbase_txids[1]) block.hashMerkleRoot = block.calc_merkle_root() - block.rehash() block.solve() self.test_dersig_info(is_active=True) # Not active as of current tip, but next block must obey rules diff --git a/test/functional/feature_nulldummy.py b/test/functional/feature_nulldummy.py index 217a38050d..04c4e7e50c 100755 --- a/test/functional/feature_nulldummy.py +++ b/test/functional/feature_nulldummy.py @@ -130,7 +130,6 @@ class NULLDUMMYTest(BitcoinTestFramework): block.hashMerkleRoot = block.calc_merkle_root() if with_witness: add_witness_commitment(block) - block.rehash() block.solve() assert_equal(None if accept else NULLDUMMY_ERROR, node.submitblock(block.serialize().hex())) if accept: diff --git a/test/functional/feature_taproot.py b/test/functional/feature_taproot.py index 50a25ee1ef..5f90e49de1 100755 --- a/test/functional/feature_taproot.py +++ b/test/functional/feature_taproot.py @@ -1240,7 +1240,6 @@ class TaprootTest(BitcoinTestFramework): block.vtx.append(tx) block.hashMerkleRoot = block.calc_merkle_root() witness and add_witness_commitment(block) - block.rehash() block.solve() block_response = node.submitblock(block.serialize().hex()) if err_msg is not None: @@ -1488,7 +1487,6 @@ class TaprootTest(BitcoinTestFramework): # Mine a block with the transaction block = create_block(tmpl=self.nodes[1].getblocktemplate(NORMAL_GBT_REQUEST_PARAMS), txlist=[rawtx]) add_witness_commitment(block) - block.rehash() block.solve() assert_equal(None, self.nodes[1].submitblock(block.serialize().hex())) self.sync_blocks() diff --git a/test/functional/feature_txindex_compatibility.py b/test/functional/feature_txindex_compatibility.py new file mode 100755 index 0000000000..bbe1d1b537 --- /dev/null +++ b/test/functional/feature_txindex_compatibility.py @@ -0,0 +1,92 @@ +#!/usr/bin/env python3 +# Copyright (c) 2021 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. +"""Test that legacy txindex will be disabled on upgrade. + +Previous releases are required by this test, see test/README.md. +""" + +import os +import shutil + +from test_framework.test_framework import BitcoinTestFramework +from test_framework.wallet import MiniWallet + + +class MempoolCompatibilityTest(BitcoinTestFramework): + def set_test_params(self): + self.num_nodes = 3 + self.extra_args = [ + ["-reindex", "-txindex"], + [], + [], + ] + + def skip_test_if_missing_module(self): + self.skip_if_no_previous_releases() + + def setup_network(self): + self.add_nodes( + self.num_nodes, + self.extra_args, + versions=[ + 160300, # Last release with legacy txindex + None, # For MiniWallet, without migration code + 200100, # Any release with migration code (0.17.x - 22.x) + ], + ) + self.start_nodes() + self.connect_nodes(0, 1) + self.connect_nodes(1, 2) + + def run_test(self): + mini_wallet = MiniWallet(self.nodes[1]) + mini_wallet.rescan_utxos() + spend_utxo = mini_wallet.get_utxo() + mini_wallet.send_self_transfer(from_node=self.nodes[1], utxo_to_spend=spend_utxo) + self.generate(self.nodes[1], 1) + + self.log.info("Check legacy txindex") + self.nodes[0].getrawtransaction(txid=spend_utxo["txid"]) # Requires -txindex + + self.stop_nodes() + legacy_chain_dir = os.path.join(self.nodes[0].datadir, self.chain) + + self.log.info("Migrate legacy txindex") + migrate_chain_dir = os.path.join(self.nodes[2].datadir, self.chain) + shutil.rmtree(migrate_chain_dir) + shutil.copytree(legacy_chain_dir, migrate_chain_dir) + with self.nodes[2].assert_debug_log([ + "Upgrading txindex database...", + "txindex is enabled at height 200", + ]): + self.start_node(2, extra_args=["-txindex"]) + self.nodes[2].getrawtransaction(txid=spend_utxo["txid"]) # Requires -txindex + + self.log.info("Drop legacy txindex") + drop_index_chain_dir = os.path.join(self.nodes[1].datadir, self.chain) + shutil.rmtree(drop_index_chain_dir) + shutil.copytree(legacy_chain_dir, drop_index_chain_dir) + self.nodes[1].assert_start_raises_init_error( + extra_args=["-txindex"], + expected_msg="Error: The block index db contains a legacy 'txindex'. To clear the occupied disk space, run a full -reindex, otherwise ignore this error. This error message will not be displayed again.", + ) + # Build txindex from scratch and check there is no error this time + self.start_node(1, extra_args=["-txindex"]) + self.nodes[2].getrawtransaction(txid=spend_utxo["txid"]) # Requires -txindex + + self.stop_nodes() + + self.log.info("Check migrated txindex can not be read by legacy node") + err_msg = f": You need to rebuild the database using -reindex to change -txindex.{os.linesep}Please restart with -reindex or -reindex-chainstate to recover." + shutil.rmtree(legacy_chain_dir) + shutil.copytree(migrate_chain_dir, legacy_chain_dir) + self.nodes[0].assert_start_raises_init_error(extra_args=["-txindex"], expected_msg=err_msg) + shutil.rmtree(legacy_chain_dir) + shutil.copytree(drop_index_chain_dir, legacy_chain_dir) + self.nodes[0].assert_start_raises_init_error(extra_args=["-txindex"], expected_msg=err_msg) + + +if __name__ == "__main__": + MempoolCompatibilityTest().main() diff --git a/test/functional/p2p_invalid_block.py b/test/functional/p2p_invalid_block.py index 875ab52db4..6eb8b8767d 100755 --- a/test/functional/p2p_invalid_block.py +++ b/test/functional/p2p_invalid_block.py @@ -75,7 +75,6 @@ class InvalidBlockRequestTest(BitcoinTestFramework): block2.vtx.extend([tx1, tx2]) block2.hashMerkleRoot = block2.calc_merkle_root() - block2.rehash() block2.solve() orig_hash = block2.sha256 block2_orig = copy.deepcopy(block2) @@ -95,7 +94,6 @@ class InvalidBlockRequestTest(BitcoinTestFramework): block2_dup.vtx[2].vin.append(block2_dup.vtx[2].vin[0]) block2_dup.vtx[2].rehash() block2_dup.hashMerkleRoot = block2_dup.calc_merkle_root() - block2_dup.rehash() block2_dup.solve() peer.send_blocks_and_test([block2_dup], node, success=False, reject_reason='bad-txns-inputs-duplicate') @@ -107,7 +105,6 @@ class InvalidBlockRequestTest(BitcoinTestFramework): block3.vtx[0].sha256 = None block3.vtx[0].calc_sha256() block3.hashMerkleRoot = block3.calc_merkle_root() - block3.rehash() block3.solve() peer.send_blocks_and_test([block3], node, success=False, reject_reason='bad-cb-amount') @@ -134,7 +131,6 @@ class InvalidBlockRequestTest(BitcoinTestFramework): tx3.rehash() block4.vtx.append(tx3) block4.hashMerkleRoot = block4.calc_merkle_root() - block4.rehash() block4.solve() self.log.info("Test inflation by duplicating input") peer.send_blocks_and_test([block4], node, success=False, reject_reason='bad-txns-inputs-duplicate') diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py index 968fd6fe98..99bf34912f 100755 --- a/test/functional/p2p_segwit.py +++ b/test/functional/p2p_segwit.py @@ -790,7 +790,6 @@ class SegWitTest(BitcoinTestFramework): block_3.vtx[0].vout.append(CTxOut(0, CScript([OP_RETURN, WITNESS_COMMITMENT_HEADER + ser_uint256(2), 10]))) block_3.vtx[0].rehash() block_3.hashMerkleRoot = block_3.calc_merkle_root() - block_3.rehash() block_3.solve() test_witness_block(self.nodes[0], self.test_node, block_3, accepted=False, reason='bad-witness-merkle-match') @@ -804,7 +803,6 @@ class SegWitTest(BitcoinTestFramework): block_3.vtx[0].vout[-1].nValue += 1 block_3.vtx[0].rehash() block_3.hashMerkleRoot = block_3.calc_merkle_root() - block_3.rehash() assert len(block_3.vtx[0].vout) == 4 # 3 OP_returns block_3.solve() test_witness_block(self.nodes[0], self.test_node, block_3, accepted=True) diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 916cd94b79..37fc549922 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -296,6 +296,7 @@ BASE_SCRIPTS = [ 'rpc_deriveaddresses.py --usecli', 'p2p_ping.py', 'rpc_scantxoutset.py', + 'feature_txindex_compatibility.py', 'feature_logging.py', 'feature_anchors.py', 'feature_coinstatsindex.py', @@ -347,7 +348,7 @@ def main(): parser.add_argument('--keepcache', '-k', action='store_true', help='the default behavior is to flush the cache directory on startup. --keepcache retains the cache from the previous testrun.') parser.add_argument('--quiet', '-q', action='store_true', help='only print dots, results summary and failure logs') parser.add_argument('--tmpdirprefix', '-t', default=tempfile.gettempdir(), help="Root directory for datadirs") - parser.add_argument('--failfast', action='store_true', help='stop execution after the first test failure') + parser.add_argument('--failfast', '-F', action='store_true', help='stop execution after the first test failure') parser.add_argument('--filter', help='filter scripts to run by regular expression') args, unknown_args = parser.parse_known_args() diff --git a/test/functional/wallet_bumpfee.py b/test/functional/wallet_bumpfee.py index 34ee06b2fe..063211d5c3 100755 --- a/test/functional/wallet_bumpfee.py +++ b/test/functional/wallet_bumpfee.py @@ -598,7 +598,6 @@ def submit_block_with_tx(node, tx): block_time = node.getblockheader(tip)["mediantime"] + 1 block = create_block(int(tip, 16), create_coinbase(height), block_time) block.vtx.append(ctx) - block.rehash() block.hashMerkleRoot = block.calc_merkle_root() add_witness_commitment(block) block.solve() diff --git a/test/functional/wallet_resendwallettransactions.py b/test/functional/wallet_resendwallettransactions.py index 37dee219e7..1e0c4f2883 100755 --- a/test/functional/wallet_resendwallettransactions.py +++ b/test/functional/wallet_resendwallettransactions.py @@ -48,7 +48,6 @@ class ResendWalletTransactionsTest(BitcoinTestFramework): block_time = int(time.time()) + 6 * 60 node.setmocktime(block_time) block = create_block(int(node.getbestblockhash(), 16), create_coinbase(node.getblockcount() + 1), block_time) - block.rehash() block.solve() node.submitblock(block.serialize().hex()) |