mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-08 21:59:10 +02:00
test: rename CTransaction .rehash()/.hash -> .txid_hex for consistency
Note that we unfortunately can't use a scripted diff here, as the same property and method name is also used for `CBlockHeader`/`CBlock` instances.
This commit is contained in:
@@ -77,13 +77,13 @@ class MempoolWtxidTest(BitcoinTestFramework):
|
||||
child_one.wit.vtxinwit.append(CTxInWitness())
|
||||
child_one.wit.vtxinwit[0].scriptWitness.stack = [b'Preimage', b'\x01', witness_script]
|
||||
child_one_wtxid = child_one.getwtxid()
|
||||
child_one_txid = child_one.rehash()
|
||||
child_one_txid = child_one.txid_hex
|
||||
|
||||
# Create another identical transaction with witness solving second branch
|
||||
child_two = deepcopy(child_one)
|
||||
child_two.wit.vtxinwit[0].scriptWitness.stack = [b'', witness_script]
|
||||
child_two_wtxid = child_two.getwtxid()
|
||||
child_two_txid = child_two.rehash()
|
||||
child_two_txid = child_two.txid_hex
|
||||
|
||||
assert_equal(child_one_txid, child_two_txid)
|
||||
assert_not_equal(child_one_wtxid, child_two_wtxid)
|
||||
|
||||
Reference in New Issue
Block a user