Documentation ¶
Overview ¶
A node in the mesh, this is how we keep track of an individual peer. Due to a circular import SNAFU, this isn't part of the 'networking' package.
Used to track a node's status as encapsulated in Java's StatusResponse message content class. Informational purposes only, so some info duplication is OK here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct { Identifier []byte // wallet public key (32 bytes) IpAddress []byte // IPv4 address, stored as bytes to keep memory predictable (4 bytes) IpString string // IP copy in string format for convenience PortTcp int32 // TCP port number PortUdp int32 // UDP port number, if available QueueTimestamp int64 // this is the timestamp that determines queue placement -- it is when the verifier joined the mesh or when the verifier was last updated Nickname string // we keep those here too, no need to have a separate nickname manager IMO IdentifierChangeTimestamp int64 // when the identifier at this IP was last changed InactiveTimestamp int64 // when the verifier was marked as inactive; -1 for active verifiers LastNodeJoinBlock int64 // number of the last frozen edge block when we sent this node a node join message, set to 0 if it should receive a message FailedConnectionCount int // number of failed connection attempts to this node }
func ReadNewNode ¶
Convenience to create a new node from bytes
func (*Node) GetSerializedLength ¶
Serializable Interface: How many bytes will ToBytes return?
type Status ¶
type Status struct { Identifier []byte Timestamp int64 Ip []byte Nickname string Version int MeshTotal int MeshCycle int CycleLength int Transactions int RetentionEdge int64 TrailingEdge int64 FrozenEdge int64 OpenEdge int64 BlocksTransmitted int64 BlocksCreated int64 VoteStats string LastJoinHeight int64 LastRemovalHeight int64 ReceivingUDP bool }
Click to show internal directories.
Click to hide internal directories.