MCPcopy
hub / github.com/jimmysong/programmingbitcoin / parse

Method parse

code-ch13/network.py:210–212  ·  view source on GitHub ↗
(cls, s)

Source from the content-addressed store, hash-verified

208
209 @classmethod
210 def parse(cls, s):
211 nonce = s.read(8)
212 return cls(nonce)
213
214 def serialize(self):
215 return self.nonce

Callers 6

test_parseMethod · 0.45
test_serializeMethod · 0.45
parseMethod · 0.45
test_parseMethod · 0.45
readMethod · 0.45
wait_forMethod · 0.45

Calls 1

readMethod · 0.45

Tested by 3

test_parseMethod · 0.36
test_serializeMethod · 0.36
test_parseMethod · 0.36