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 committed 2025-07-17 11:59:10 +02:00
1 parent 8b09cc350a
commit 23be0ec2f0
33 files changed
+141 -145

No files matched your search

+2 -2
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