Skip to content

Commit ec004cd

Browse files
test: Use rehash() in outbound eviction block-relay
Ensure that tip_header.rehash() is used instead of tip_header.hash, which is None when the header is deserialized from hex. This avoids depending on wait_for_getheaders() falling back to any received message, making the test more explicit and robust.
1 parent 26598ed commit ec004cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/functional/p2p_outbound_eviction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def test_outbound_eviction_blocks_relay_only(self):
235235
cur_mock_time += (CHAIN_SYNC_TIMEOUT + 1)
236236
node.setmocktime(cur_mock_time)
237237
peer.sync_with_ping()
238-
peer.wait_for_getheaders(block_hash=tip_header.hash)
238+
peer.wait_for_getheaders(block_hash=tip_header.rehash())
239239
cur_mock_time += (HEADERS_RESPONSE_TIME + 1)
240240
node.setmocktime(cur_mock_time)
241241
self.log.info("Test that the peer gets evicted")

0 commit comments

Comments
 (0)