| 14 | |
| 15 | |
| 16 | class 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 | |
| 26 | class GetdataTest(BitcoinTestFramework): |