Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClaimedIPPort ¶
type ClaimedIPPort struct { // The peer's certificate. Cert *staking.Certificate // The peer's claimed IP and port. IPPort IPPort // The time the peer claimed to own this IP and port. Timestamp uint64 // [Cert]'s signature over the IPPort and timestamp. // This is used in the networking library to ensure that this IPPort was // actually claimed by the peer in question, and not by a malicious peer // trying to get us to dial bogus IPPorts. Signature []byte // The txID that added this peer into the validator set TxID ids.ID }
A self contained proof that a peer is claiming ownership of an IPPort at a given time.
func (*ClaimedIPPort) BytesLen ¶
func (i *ClaimedIPPort) BytesLen() int
Returns the length of the byte representation of this ClaimedIPPort.
type DynamicIPPort ¶
type DynamicIPPort interface { // Returns the IP + port pair. IPPort() IPPort // Changes the IP. SetIP(ip net.IP) }
An IPPort that can change. Safe for use by multiple goroutines.
func NewDynamicIPPort ¶
func NewDynamicIPPort(ip net.IP, port uint16) DynamicIPPort
type IPDesc ¶ added in v1.10.3
type IPDesc IPPort
func (IPDesc) MarshalJSON ¶ added in v1.10.3
func (*IPDesc) UnmarshalJSON ¶ added in v1.10.3
Click to show internal directories.
Click to hide internal directories.