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

Method read

code-ch13/network.py:381–386  ·  view source on GitHub ↗

Read a message from the socket

(self)

Source from the content-addressed store, hash-verified

379 self.socket.sendall(envelope.serialize())
380
381 def read(self):
382 '''Read a message from the socket'''
383 envelope = NetworkEnvelope.parse(self.stream, testnet=self.testnet)
384 if self.logging:
385 print('receiving: {}'.format(envelope))
386 return envelope
387
388 def wait_for(self, *message_classes):
389 '''Wait for one of the messages in the list'''

Callers 15

wait_forMethod · 0.95
load_cacheMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
read_varintFunction · 0.45
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected