MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / wait_for_header

Method wait_for_header

test/functional/test_framework/p2p.py:641–648  ·  view source on GitHub ↗
(self, blockhash, *, timeout=60)

Source from the content-addressed store, hash-verified

639 self.wait_until(test_function, timeout=timeout)
640
641 def wait_for_header(self, blockhash, *, timeout=60):
642 def test_function():
643 last_headers = self.last_message.get('headers')
644 if not last_headers:
645 return False
646 return last_headers.headers[0].hash_int == int(blockhash, 16)
647
648 self.wait_until(test_function, timeout=timeout)
649
650 def wait_for_merkleblock(self, blockhash, *, timeout=60):
651 def test_function():

Callers 2

run_testMethod · 0.80
run_testMethod · 0.80

Calls 1

wait_untilMethod · 0.95

Tested by

no test coverage detected