Beispiel #1
0
 def msg_ser(self, f):
     f.write(struct.pack(b"<i", self.nVersion))
     f.write(struct.pack(b"<Q", self.nServices))
     f.write(struct.pack(b"<q", self.nTime))
     self.addrTo.stream_serialize(f, True)
     self.addrFrom.stream_serialize(f, True)
     f.write(struct.pack(b"<Q", self.nNonce))
     VarStringSerializer.stream_serialize(self.strSubVer, f)
     f.write(struct.pack(b"<i", self.nStartingHeight))
Beispiel #2
0
 def msg_ser(self, f):
     f.write(struct.pack(b"<i", self.nVersion))
     f.write(struct.pack(b"<Q", self.nServices))
     f.write(struct.pack(b"<q", self.nTime))
     self.addrTo.stream_serialize(f, True)
     self.addrFrom.stream_serialize(f, True)
     f.write(struct.pack(b"<Q", self.nNonce))
     VarStringSerializer.stream_serialize(self.strSubVer, f)
     f.write(struct.pack(b"<i", self.nStartingHeight))
Beispiel #3
0
 def msg_ser(self, f):
     VarStringSerializer.stream_serialize(self.message, f)
     f.write(struct.pack(b"<c", self.ccode))
     VarStringSerializer.stream_serialize(self.reason, f)
Beispiel #4
0
 def msg_ser(self, f):
     VarStringSerializer.stream_serialize(self.message, f)
     f.write(struct.pack(b"<c", self.ccode))
     VarStringSerializer.stream_serialize(self.reason, f)