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:
Sebastian Falbesoner
2025-05-05 00:11:32 +02:00
parent e9cdaefb0a
commit ce83924237
30 changed files with 136 additions and 141 deletions

View File

@@ -619,7 +619,7 @@ class P2PInterface(P2PConnection):
def test_function():
if not self.last_message.get('tx'):
return False
return self.last_message['tx'].tx.rehash() == txid
return self.last_message['tx'].tx.txid_hex == txid
self.wait_until(test_function, timeout=timeout)
@@ -927,11 +927,11 @@ class P2PDataStore(P2PInterface):
if success:
# Check that all txs are now in the mempool
for tx in txs:
assert tx.hash in raw_mempool, "{} not found in mempool".format(tx.hash)
assert tx.txid_hex in raw_mempool, "{} not found in mempool".format(tx.txid_hex)
else:
# Check that none of the txs are now in the mempool
for tx in txs:
assert tx.hash not in raw_mempool, "{} tx found in mempool".format(tx.hash)
assert tx.txid_hex not in raw_mempool, "{} tx found in mempool".format(tx.txid_hex)
class P2PTxInvStore(P2PInterface):
"""A P2PInterface which stores a count of how many times each txid has been announced."""