| 171 | |
| 172 | |
| 173 | class CAlert(Serializable): |
| 174 | def __init__(self): |
| 175 | self.vchMsg = b"" |
| 176 | self.vchSig = b"" |
| 177 | |
| 178 | @classmethod |
| 179 | def stream_deserialize(cls, f): |
| 180 | c = cls() |
| 181 | c.vchMsg = VarStringSerializer.stream_deserialize(f) |
| 182 | c.vchSig = VarStringSerializer.stream_deserialize(f) |
| 183 | return c |
| 184 | |
| 185 | def stream_serialize(self, f): |
| 186 | VarStringSerializer.stream_serialize(self.vchMsg, f) |
| 187 | VarStringSerializer.stream_serialize(self.vchSig, f) |
| 188 | |
| 189 | def __repr__(self): |
| 190 | return "CAlert(vchMsg.sz %d, vchSig.sz %d)" % (len(self.vchMsg), len(self.vchSig)) |
| 191 | |
| 192 | __all__ = ( |
| 193 | 'PROTO_VERSION', |
no outgoing calls