validatorinfo

package
v0.0.0-...-6e04e41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: ISC Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAddrHost

func GetAddrHost(addr net.Addr) net.IP

func GetAddrStringHost

func GetAddrStringHost(addr string) string

Types

type ValidatorInfo

type ValidatorInfo struct {
	Host            string
	ValidatorId     uint64
	PublicKey       [btcec.PubKeyBytesLenCompressed]byte
	CreateTime      time.Time
	ActivitionCount int32
	GeneratorCount  int32
	DiscountCount   int32
	FaultCount      int32
	ValidatorScore  int32
}

type ValidatorInfoMask

type ValidatorInfoMask uint64
const (
	MaskValidatorId     ValidatorInfoMask = 1 << 0
	MaskPublicKey       ValidatorInfoMask = 1 << 1
	MaskActivitionCount ValidatorInfoMask = 1 << 2
	MaskGeneratorCount  ValidatorInfoMask = 1 << 3
	MaskDiscountCount   ValidatorInfoMask = 1 << 4
	MaskFaultCount      ValidatorInfoMask = 1 << 5
	MaskCreateTime      ValidatorInfoMask = 1 << 6
	MaskHost            ValidatorInfoMask = 1 << 7

	MaskAll ValidatorInfoMask = MaskValidatorId | MaskPublicKey | MaskActivitionCount | MaskGeneratorCount | MaskDiscountCount | MaskFaultCount | MaskCreateTime
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL