test: introduce and use CTransaction .wtxid_int property

This commits removes the `.calc_sha256` method from the CTransaction
and introduces a property `.wtxid_int` property as replacement.
This commit is contained in:
Sebastian Falbesoner
2025-05-04 23:30:41 +02:00
parent 9b3dce24a3
commit e9cdaefb0a
5 changed files with 14 additions and 14 deletions

View File

@@ -107,7 +107,7 @@ def create_block(hashprev=None, coinbase=None, ntime=None, *, version=None, tmpl
block.vtx.append(coinbase)
if txlist:
for tx in txlist:
if not hasattr(tx, 'calc_sha256'):
if type(tx) is str:
tx = tx_from_hex(tx)
block.vtx.append(tx)
block.hashMerkleRoot = block.calc_merkle_root()