MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / msg_ping

Class msg_ping

test/functional/test_framework/messages.py:1427–1443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1425
1426
1427class msg_ping:
1428 __slots__ = ("nonce",)
1429 msgtype = b"ping"
1430
1431 def __init__(self, nonce=0):
1432 self.nonce = nonce
1433
1434 def deserialize(self, f):
1435 self.nonce = int.from_bytes(f.read(8), "little")
1436
1437 def serialize(self):
1438 r = b""
1439 r += self.nonce.to_bytes(8, "little")
1440 return r
1441
1442 def __repr__(self):
1443 return "msg_ping(nonce=%08x)" % self.nonce
1444
1445
1446class msg_pong:

Callers 4

run_testMethod · 0.90
test_bufferMethod · 0.90
on_versionMethod · 0.90
sync_with_pingMethod · 0.90

Calls

no outgoing calls

Tested by 1

test_bufferMethod · 0.72