-
Notifications
You must be signed in to change notification settings - Fork 665
/
priorities.go
36 lines (31 loc) · 1.19 KB
/
priorities.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
32
33
34
35
36
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package state
const (
// First subnet delegators are removed from the current validator set,
SubnetDelegatorCurrentPriority Priority = iota + 1
// then subnet validators,
SubnetValidatorCurrentPriority
// then primary network delegators,
PrimaryNetworkDelegatorCurrentPriority
// then primary network validators.
PrimaryNetworkValidatorCurrentPriority
)
const (
// First primary network delegators are moved from the pending to the
// current validator set,
PrimaryNetworkDelegatorPendingPriority Priority = iota + 1
// then primary network validators,
PrimaryNetworkValidatorPendingPriority
// then subnet validators,
SubnetValidatorPendingPriority
// then subnet delegators.
SubnetDelegatorPendingPriority
)
var PendingToCurrentPriorities = []Priority{
PrimaryNetworkValidatorPendingPriority: PrimaryNetworkValidatorCurrentPriority,
PrimaryNetworkDelegatorPendingPriority: PrimaryNetworkDelegatorCurrentPriority,
SubnetValidatorPendingPriority: SubnetValidatorCurrentPriority,
SubnetDelegatorPendingPriority: SubnetDelegatorCurrentPriority,
}
type Priority byte