MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / sync_blocks

Method sync_blocks

test/functional/feature_block.py:1315–1322  ·  view source on GitHub ↗

Sends blocks to test node. Syncs and verifies that tip has advanced to most recent block. Call with success = False if the tip shouldn't advance to the most recent block.

(self, blocks, success=True, reject_code=None, reject_reason=None, request_block=True, reconnect=False, timeout=60)

Source from the content-addressed store, hash-verified

1313 self.bootstrap_p2p()
1314
1315 def sync_blocks(self, blocks, success=True, reject_code=None, reject_reason=None, request_block=True, reconnect=False, timeout=60):
1316 """Sends blocks to test node. Syncs and verifies that tip has advanced to most recent block.
1317
1318 Call with success = False if the tip shouldn't advance to the most recent block."""
1319 self.nodes[0].p2p.send_blocks_and_test(blocks, self.nodes[0], success=success, reject_code=reject_code, reject_reason=reject_reason, request_block=request_block, timeout=timeout)
1320
1321 if reconnect:
1322 self.reconnect_p2p()
1323
1324if __name__ == '__main__':
1325 FullBlockTest().main()

Callers 1

run_testMethod · 0.95

Calls 2

reconnect_p2pMethod · 0.95
send_blocks_and_testMethod · 0.80

Tested by

no test coverage detected