Documentation ¶
Index ¶
- type EnrState
- func (s *EnrState) FallbackIP() net.IP
- func (s *EnrState) FallbackUDP() uint16
- func (s *EnrState) GetNode() *enode.Node
- func (s *EnrState) GetPriv() *crypto.Secp256k1PrivateKey
- func (s *EnrState) LocalNode() *enode.LocalNode
- func (s *EnrState) SetAttnets(dat *beacon.AttnetBits)
- func (s *EnrState) SetEth2Data(dat *beacon.Eth2Data)
- func (s *EnrState) SetFallbackIP(ip net.IP)
- func (s *EnrState) SetFallbackUDP(port uint16)
- func (s *EnrState) SetIP(ip net.IP)
- func (s *EnrState) SetStaticIP(ip net.IP)
- func (s *EnrState) SetTCP(port uint16)
- func (s *EnrState) SetUDP(port uint16)
- func (s *EnrState) StaticIP() net.IP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnrState ¶
type EnrState struct {
// contains filtered or unexported fields
}
func NewEnrState ¶
func NewEnrState(staticIP net.IP, fallbackIP net.IP, fallbackUDP uint16, privKey *crypto.Secp256k1PrivateKey) (*EnrState, error)
Create a new ENR state with a private key. The static / fallback choices are optional.
func (*EnrState) FallbackIP ¶
FallbackIP returns the current static IP, or nil if none is set.
func (*EnrState) FallbackUDP ¶
FallbackUDP returns the current static IP, or nil if none is set.
func (*EnrState) GetPriv ¶
func (s *EnrState) GetPriv() *crypto.Secp256k1PrivateKey
func (*EnrState) SetAttnets ¶
func (s *EnrState) SetAttnets(dat *beacon.AttnetBits)
func (*EnrState) SetEth2Data ¶
func (*EnrState) SetFallbackIP ¶
func (*EnrState) SetFallbackUDP ¶
func (*EnrState) SetStaticIP ¶
Click to show internal directories.
Click to hide internal directories.