| 1366 | |
| 1367 | |
| 1368 | class msg_block: |
| 1369 | __slots__ = ("block",) |
| 1370 | msgtype = b"block" |
| 1371 | |
| 1372 | def __init__(self, block=None): |
| 1373 | if block is None: |
| 1374 | self.block = CBlock() |
| 1375 | else: |
| 1376 | self.block = block |
| 1377 | |
| 1378 | def deserialize(self, f): |
| 1379 | self.block.deserialize(f) |
| 1380 | |
| 1381 | def serialize(self): |
| 1382 | return self.block.serialize() |
| 1383 | |
| 1384 | def __repr__(self): |
| 1385 | return "msg_block(block=%s)" % (repr(self.block)) |
| 1386 | |
| 1387 | |
| 1388 | # Generic type to control the raw bytes sent over the wire. |
no outgoing calls