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

Class P2PStoreBlock

test/functional/p2p_getdata.py:16–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14
15
16class P2PStoreBlock(P2PInterface):
17 def __init__(self):
18 super().__init__()
19 self.blocks = defaultdict(int)
20
21 def on_block(self, message):
22 message.block.calc_sha256()
23 self.blocks[message.block.sha256] += 1
24
25
26class GetdataTest(BitcoinTestFramework):

Callers 1

run_testMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected