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