test: rename CBlockHeader .rehash()/.sha256 -> .hash_int for consistency

Note that we unfortunately can't use a scripted diff here, as the
`sha256` symbol is also used for other instances (e.g. as function
in hashlib, or in the `UTXO` class in p2p_segwit.py).
This commit is contained in:
Sebastian Falbesoner
2025-06-12 14:13:55 +02:00
parent 8b09cc350a
commit 23be0ec2f0
33 changed files with 141 additions and 145 deletions

View File

@@ -57,7 +57,7 @@ class BaseNode(P2PInterface):
"""Override the standard on_block callback
Store the hash of a received block in the dictionary."""
self.block_receive_map[message.block.sha256] += 1
self.block_receive_map[message.block.hash_int] += 1
def on_inv(self, message):
"""Override the standard on_inv callback"""
@@ -181,7 +181,7 @@ class ExampleTest(BitcoinTestFramework):
block_message = msg_block(block)
# Send message is used to send a P2P message to the node over our P2PInterface
peer_messaging.send_without_ping(block_message)
self.tip = block.sha256
self.tip = block.hash_int
blocks.append(self.tip)
self.block_time += 1
height += 1