| 475 | |
| 476 | |
| 477 | class COutPoint: |
| 478 | __slots__ = ("hash", "n") |
| 479 | |
| 480 | def __init__(self, hash=0, n=0): |
| 481 | self.hash = hash |
| 482 | self.n = n |
| 483 | |
| 484 | def deserialize(self, f): |
| 485 | self.hash = deser_uint256(f) |
| 486 | self.n = int.from_bytes(f.read(4), "little") |
| 487 | |
| 488 | def serialize(self): |
| 489 | r = b"" |
| 490 | r += ser_uint256(self.hash) |
| 491 | r += self.n.to_bytes(4, "little") |
| 492 | return r |
| 493 | |
| 494 | def __repr__(self): |
| 495 | return "COutPoint(hash=%064x n=%i)" % (self.hash, self.n) |
| 496 | |
| 497 | |
| 498 | class CTxIn: |
no outgoing calls