Skip to content

Commit

Permalink
test: create txs with current nVersion (2) by default
Browse files Browse the repository at this point in the history
This enables testing of BIP68 without the need of explicitly
setting nVersion to 2. This is e.g. useful for transactions
created with MiniWallet.
  • Loading branch information
theStack committed Jan 11, 2022
1 parent 2f79786 commit f30041c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/functional/feature_utxo_set_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def test_muhash_implementation(self):
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()
Expand Down
2 changes: 1 addition & 1 deletion test/functional/test_framework/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit f30041c

Please sign in to comment.