(self, f)
| 736 | self.prefilled_txn = [] |
| 737 | |
| 738 | def deserialize(self, f): |
| 739 | self.header.deserialize(f, legacy=False) |
| 740 | self.nonce = struct.unpack("<Q", f.read(8))[0] |
| 741 | self.shortids_length = deser_compact_size(f) |
| 742 | for i in range(self.shortids_length): |
| 743 | # shortids are defined to be 6 bytes in the spec, so append |
| 744 | # two zero bytes and read it in as an 8-byte number |
| 745 | self.shortids.append(struct.unpack("<Q", f.read(6) + b'\x00\x00')[0]) |
| 746 | self.prefilled_txn = deser_vector(f, PrefilledTransaction) |
| 747 | self.prefilled_txn_length = len(self.prefilled_txn) |
| 748 | |
| 749 | # When using version 2 compact blocks, we must serialize with_witness. |
| 750 | def serialize(self, with_witness=False): |
nothing calls this directly
no test coverage detected