NewValidator returns a new validator with the given pubkey and voting power.
(pubKey crypto.PubKey, votingPower int64)
| 25 | |
| 26 | // NewValidator returns a new validator with the given pubkey and voting power. |
| 27 | func NewValidator(pubKey crypto.PubKey, votingPower int64) *Validator { |
| 28 | return &Validator{ |
| 29 | Address: pubKey.Address(), |
| 30 | PubKey: pubKey, |
| 31 | VotingPower: votingPower, |
| 32 | ProposerPriority: 0, |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | // ValidateBasic performs basic validation. |
| 37 | func (v *Validator) ValidateBasic() error { |