(self)
| 1678 | |
| 1679 | # Struct deep clone |
| 1680 | def clone(self): |
| 1681 | # Serialize the struct to the FBE stream |
| 1682 | writer = AccountModel(fbe.WriteBuffer()) |
| 1683 | writer.serialize(self) |
| 1684 | |
| 1685 | # Deserialize the struct from the FBE stream |
| 1686 | reader = AccountModel(fbe.ReadBuffer()) |
| 1687 | reader.attach_buffer(writer.buffer) |
| 1688 | return reader.deserialize()[0] |
| 1689 | |
| 1690 | def __eq__(self, other): |
| 1691 | if not isinstance(self, other.__class__): |