MCPcopy Index your code
hub / github.com/petertodd/python-bitcoinlib / CAlert

Class CAlert

bitcoin/net.py:173–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171
172
173class 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',

Callers 2

test_serializationMethod · 0.90
__init__Method · 0.85

Calls

no outgoing calls

Tested by 1

test_serializationMethod · 0.72