MCPcopy Create free account
hub / github.com/ElementsProject/elements / request_block

Method request_block

test/functional/p2p_segwit.py:210–215  ·  view source on GitHub ↗
(self, blockhash, inv_type, timeout=60)

Source from the content-addressed store, hash-verified

208 self.wait_for_getdata([block.sha256])
209
210 def request_block(self, blockhash, inv_type, timeout=60):
211 with p2p_lock:
212 self.last_message.pop("block", None)
213 self.send_message(msg_getdata(inv=[CInv(inv_type, blockhash)]))
214 self.wait_for_block(blockhash, timeout)
215 return self.last_message["block"].block
216
217class SegWitTest(BitcoinTestFramework):
218 def set_test_params(self):

Callers 1

test_block_relayMethod · 0.45

Calls 4

msg_getdataClass · 0.90
CInvClass · 0.90
send_messageMethod · 0.45
wait_for_blockMethod · 0.45

Tested by 1

test_block_relayMethod · 0.36