test: rename CTransaction .sha256 -> .txid_int for consistency

Note that we unfortunately can't use a scripted diff here, as the same
property name is also used for `CBlockHeader`/`CBlock` instances.
This commit is contained in:
Sebastian Falbesoner committed 2025-06-11 00:52:25 +02:00
1 parent ce83924237
commit 81af4334e8
13 files changed
+114 -114

No files matched your search

+4 -4
View File
@@ -224,7 +224,7 @@ class BIP68Test(BitcoinTestFramework):
# Sequence lock of 0 should pass.
tx2 = CTransaction()
tx2.version = 2
tx2.vin = [CTxIn(COutPoint(tx1.sha256, 0), nSequence=0)]
tx2.vin = [CTxIn(COutPoint(tx1.txid_int, 0), nSequence=0)]
tx2.vout = [CTxOut(int(tx1.vout[0].nValue - self.relayfee * COIN), SCRIPT_W0_SH_OP_TRUE)]
self.wallet.sign_tx(tx=tx2)
tx2_raw = tx2.serialize().hex()
@@ -241,7 +241,7 @@ class BIP68Test(BitcoinTestFramework):
tx = CTransaction()
tx.version = 2
tx.vin = [CTxIn(COutPoint(orig_tx.sha256, 0), nSequence=sequence_value)]
tx.vin = [CTxIn(COutPoint(orig_tx.txid_int, 0), nSequence=sequence_value)]
tx.wit.vtxinwit = [CTxInWitness()]
tx.wit.vtxinwit[0].scriptWitness.stack = [CScript([OP_TRUE])]
tx.vout = [CTxOut(int(orig_tx.vout[0].nValue - relayfee * COIN), SCRIPT_W0_SH_OP_TRUE)]
@@ -353,7 +353,7 @@ class BIP68Test(BitcoinTestFramework):
# Make an anyone-can-spend transaction
tx2 = CTransaction()
tx2.version = 1
tx2.vin = [CTxIn(COutPoint(tx1.sha256, 0), nSequence=0)]
tx2.vin = [CTxIn(COutPoint(tx1.txid_int, 0), nSequence=0)]
tx2.vout = [CTxOut(int(tx1.vout[0].nValue - self.relayfee * COIN), SCRIPT_W0_SH_OP_TRUE)]
# sign tx2
@@ -368,7 +368,7 @@ class BIP68Test(BitcoinTestFramework):
tx3 = CTransaction()
tx3.version = 2
tx3.vin = [CTxIn(COutPoint(tx2.sha256, 0), nSequence=sequence_value)]
tx3.vin = [CTxIn(COutPoint(tx2.txid_int, 0), nSequence=sequence_value)]
tx3.wit.vtxinwit = [CTxInWitness()]
tx3.wit.vtxinwit[0].scriptWitness.stack = [CScript([OP_TRUE])]
tx3.vout = [CTxOut(int(tx2.vout[0].nValue - self.relayfee * COIN), SCRIPT_W0_SH_OP_TRUE)]