From f30041c9143d0added18105c9f0c4ae3f340efbc Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Tue, 11 Jan 2022 04:02:49 +0100 Subject: [PATCH] test: create txs with current `nVersion` (2) by default This enables testing of BIP68 without the need of explicitly setting nVersion to 2. This is e.g. useful for transactions created with MiniWallet. --- test/functional/feature_utxo_set_hash.py | 4 ++-- test/functional/test_framework/messages.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/functional/feature_utxo_set_hash.py b/test/functional/feature_utxo_set_hash.py index 33b7615aeaf..75180e62a29 100755 --- a/test/functional/feature_utxo_set_hash.py +++ b/test/functional/feature_utxo_set_hash.py @@ -69,8 +69,8 @@ class UTXOSetHashTest(BitcoinTestFramework): assert_equal(finalized[::-1].hex(), node_muhash) self.log.info("Test deterministic UTXO set hash results") - assert_equal(node.gettxoutsetinfo()['hash_serialized_2'], "221f245cf4c9010eeb7f5183d342c002ae6c1c27e98aa357dccb788c21d98049") - assert_equal(node.gettxoutsetinfo("muhash")['muhash'], "7c0890c68501f7630d36aeb3999dc924e63af084ae1bbfba11dd462144637635") + assert_equal(node.gettxoutsetinfo()['hash_serialized_2'], "3a570529b4c32e77268de1f81b903c75cc2da53c48df0d125c1e697ba7c8c7b7") + assert_equal(node.gettxoutsetinfo("muhash")['muhash'], "a13e0e70eb8acc786549596e3bc154623f1a5a622ba2f70715f6773ec745f435") def run_test(self): self.test_muhash_implementation() diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index bedffcef557..f57b6e74944 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -509,7 +509,7 @@ class CTransaction: def __init__(self, tx=None): if tx is None: - self.nVersion = 1 + self.nVersion = 2 self.vin = [] self.vout = [] self.wit = CTxWitness()