mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-04 10:59:08 +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:
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user