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

Method wait_for_block

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

Source from the content-addressed store, hash-verified

633 self.wait_until(test_function, timeout=timeout)
634
635 def wait_for_block(self, blockhash, *, timeout=60):
636 def test_function():
637 return self.last_message.get("block") and self.last_message["block"].block.hash_int == blockhash
638
639 self.wait_until(test_function, timeout=timeout)
640
641 def wait_for_header(self, blockhash, *, timeout=60):
642 def test_function():

Callers 5

test_nonnull_locatorsMethod · 0.45
run_testMethod · 0.45
run_testMethod · 0.45
request_blockMethod · 0.45
run_testMethod · 0.45

Calls 1

wait_untilMethod · 0.95

Tested by 1

test_nonnull_locatorsMethod · 0.36