github.com/MetalBlockchain/metalgo@v1.11.9/snow/validators/validator.go (about) 1 // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. 2 // See the file LICENSE for licensing terms. 3 4 package validators 5 6 import ( 7 "github.com/MetalBlockchain/metalgo/ids" 8 "github.com/MetalBlockchain/metalgo/utils/crypto/bls" 9 ) 10 11 // Validator is a struct that contains the base values representing a validator 12 // of the Avalanche Network. 13 type Validator struct { 14 NodeID ids.NodeID 15 PublicKey *bls.PublicKey 16 TxID ids.ID 17 Weight uint64 18 19 // index is used to efficiently remove validators from the validator set. It 20 // represents the index of this validator in the vdrSlice and weights 21 // arrays. 22 index int 23 } 24 25 // GetValidatorOutput is a struct that contains the publicly relevant values of 26 // a validator of the Avalanche Network for the output of GetValidator. 27 type GetValidatorOutput struct { 28 NodeID ids.NodeID 29 PublicKey *bls.PublicKey 30 Weight uint64 31 }