MCPcopy
hub / github.com/petertodd/python-bitcoinlib / stream_deserialize

Method stream_deserialize

bitcoin/net.py:86–90  ·  view source on GitHub ↗
(cls, f)

Source from the content-addressed store, hash-verified

84
85 @classmethod
86 def stream_deserialize(cls, f):
87 c = cls()
88 c.type = struct.unpack(b"<i", ser_read(f, 4))[0]
89 c.hash = ser_read(f, 32)
90 return c
91
92 def stream_serialize(self, f):
93 f.write(struct.pack(b"<i", self.type))

Callers 2

stream_deserializeMethod · 0.45
stream_deserializeMethod · 0.45

Calls 1

ser_readFunction · 0.90

Tested by

no test coverage detected