mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 12:51:22 +00:00
remove TimeoutTx
This commit is contained in:
@ -11,28 +11,34 @@ import (
|
||||
// TODO consider moving this to another common types package.
|
||||
type Validator struct {
|
||||
Account
|
||||
BondHeight uint32 // TODO: is this needed?
|
||||
VotingPower uint64
|
||||
Accum int64
|
||||
BondHeight uint32
|
||||
UnbondHeight uint32
|
||||
LastCommitHeight uint32
|
||||
VotingPower uint64
|
||||
Accum int64
|
||||
}
|
||||
|
||||
// Used to persist the state of ConsensusStateControl.
|
||||
func ReadValidator(r io.Reader, n *int64, err *error) *Validator {
|
||||
return &Validator{
|
||||
Account: ReadAccount(r, n, err),
|
||||
BondHeight: ReadUInt32(r, n, err),
|
||||
VotingPower: ReadUInt64(r, n, err),
|
||||
Accum: ReadInt64(r, n, err),
|
||||
Account: ReadAccount(r, n, err),
|
||||
BondHeight: ReadUInt32(r, n, err),
|
||||
UnbondHeight: ReadUInt32(r, n, err),
|
||||
LastCommitHeight: ReadUInt32(r, n, err),
|
||||
VotingPower: ReadUInt64(r, n, err),
|
||||
Accum: ReadInt64(r, n, err),
|
||||
}
|
||||
}
|
||||
|
||||
// Creates a new copy of the validator so we can mutate accum.
|
||||
func (v *Validator) Copy() *Validator {
|
||||
return &Validator{
|
||||
Account: v.Account,
|
||||
BondHeight: v.BondHeight,
|
||||
VotingPower: v.VotingPower,
|
||||
Accum: v.Accum,
|
||||
Account: v.Account,
|
||||
BondHeight: v.BondHeight,
|
||||
UnbondHeight: v.UnbondHeight,
|
||||
LastCommitHeight: v.LastCommitHeight,
|
||||
VotingPower: v.VotingPower,
|
||||
Accum: v.Accum,
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,6 +46,8 @@ func (v *Validator) Copy() *Validator {
|
||||
func (v *Validator) WriteTo(w io.Writer) (n int64, err error) {
|
||||
WriteBinary(w, v.Account, &n, &err)
|
||||
WriteUInt32(w, v.BondHeight, &n, &err)
|
||||
WriteUInt32(w, v.UnbondHeight, &n, &err)
|
||||
WriteUInt32(w, v.LastCommitHeight, &n, &err)
|
||||
WriteUInt64(w, v.VotingPower, &n, &err)
|
||||
WriteInt64(w, v.Accum, &n, &err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user