ping — Share chain status

A minimalistic class used by the PING and PONG message types to share and/or request node chain status.

class neo3.network.payloads.ping.PingPayload(height=0)

Bases: neo3.core.serialization.ISerializable

deserialize(reader)

Deserialize the object from a binary stream.

Parameters

reader (BinaryReader) – instance.

Return type

None

classmethod deserialize_from_bytes(data)

Parse data into an object instance.

Parameters

data (Union[bytes, bytearray]) – hex escaped bytes.

Return type

~ISerializable_T

Returns

a deserialized instance of the class.

serialize(writer)

Serialize the object into a binary stream.

Parameters

writer (BinaryWriter) – instance.

Return type

None

to_array()

Serialize the object into a bytearray.

Return type

bytes

current_height

The current local chain height

nonce

Random number

timestamp

The local time in UTC as a timestamp