MCPcopy Create free account
hub / github.com/ElementsProject/elements / _log_message

Method _log_message

test/functional/test_framework/p2p.py:297–306  ·  view source on GitHub ↗

Logs a message being sent or received over the connection.

(self, direction, msg)

Source from the content-addressed store, hash-verified

295 return tmsg
296
297 def _log_message(self, direction, msg):
298 """Logs a message being sent or received over the connection."""
299 if direction == "send":
300 log_message = "Send message to "
301 elif direction == "receive":
302 log_message = "Received message from "
303 log_message += "%s:%d: %s" % (self.dstaddr, self.dstport, repr(msg)[:500])
304 if len(log_message) > 500:
305 log_message += "... (msg truncated)"
306 logger.debug(log_message)
307
308
309class P2PInterface(P2PConnection):

Callers 2

_on_dataMethod · 0.95
send_messageMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected