Move IsGuardian to validator.go
Previously we put it in a generated file, which was not a good idea.
This commit is contained in:
parent
0700b0b1bb
commit
e980b6880c
|
@ -336,12 +336,6 @@ type Validator struct {
|
|||
MinSelfDelegation github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=min_self_delegation,json=minSelfDelegation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"min_self_delegation" yaml:"min_self_delegation"`
|
||||
}
|
||||
|
||||
func (*Validator) IsGuardian() bool {
|
||||
// TODO(csongor): write logic to work out if this is a guardian
|
||||
// This will require the staking module to use the wormhole module's state keeper
|
||||
return true
|
||||
}
|
||||
|
||||
func (m *Validator) Reset() { *m = Validator{} }
|
||||
func (*Validator) ProtoMessage() {}
|
||||
func (*Validator) Descriptor() ([]byte, []int) {
|
||||
|
|
|
@ -167,6 +167,12 @@ func (v Validator) IsBonded() bool {
|
|||
return v.GetStatus() == Bonded
|
||||
}
|
||||
|
||||
func (*Validator) IsGuardian() bool {
|
||||
// TODO(csongor): write logic to work out if this is a guardian
|
||||
// This will require the staking module to use the wormhole module's state keeper
|
||||
return true
|
||||
}
|
||||
|
||||
// IsUnbonded checks if the validator status equals Unbonded
|
||||
func (v Validator) IsUnbonded() bool {
|
||||
return v.GetStatus() == Unbonded
|
||||
|
|
Loading…
Reference in New Issue