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
@@ -190,7 +190,7 @@ class P2POutEvict(BitcoinTestFramework):
self.log.info("Mine a new block and keep the unprotected honest peer on sync, all the rest off-sync")
# Mine a block so all peers become outdated
target_hash = prev_header.rehash()
target_hash = prev_header.hash_int
tip_hash = self.generateblock(node, output="raw(42)", transactions=[])["hash"]
tip_header = from_hex(CBlockHeader(), node.getblockheader(tip_hash, False))
tip_headers_message = msg_headers([tip_header])
@@ -235,7 +235,7 @@ class P2POutEvict(BitcoinTestFramework):
cur_mock_time += (CHAIN_SYNC_TIMEOUT + 1)
node.setmocktime(cur_mock_time)
peer.sync_with_ping()
peer.wait_for_getheaders(block_hash=tip_header.rehash())
peer.wait_for_getheaders(block_hash=tip_header.hash_int)
cur_mock_time += (HEADERS_RESPONSE_TIME + 1)
node.setmocktime(cur_mock_time)
self.log.info("Test that the peer gets evicted")