mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 04:41:22 +00:00
remove LastCommitHeight
This commit is contained in:
@ -12,14 +12,12 @@ import (
|
||||
|
||||
// Volatile state for each Validator
|
||||
// TODO: make non-volatile identity
|
||||
// - Remove LastCommitHeight, send bitarray of vals that signed in BeginBlock
|
||||
// - Remove Accum - it can be computed, and now valset becomes identifying
|
||||
type Validator struct {
|
||||
Address []byte `json:"address"`
|
||||
PubKey crypto.PubKey `json:"pub_key"`
|
||||
LastCommitHeight int `json:"last_commit_height"`
|
||||
VotingPower int64 `json:"voting_power"`
|
||||
Accum int64 `json:"accum"`
|
||||
Address []byte `json:"address"`
|
||||
PubKey crypto.PubKey `json:"pub_key"`
|
||||
VotingPower int64 `json:"voting_power"`
|
||||
Accum int64 `json:"accum"`
|
||||
}
|
||||
|
||||
// Creates a new copy of the validator so we can mutate accum.
|
||||
@ -57,7 +55,6 @@ func (v *Validator) String() string {
|
||||
return fmt.Sprintf("Validator{%X %v %v VP:%v A:%v}",
|
||||
v.Address,
|
||||
v.PubKey,
|
||||
v.LastCommitHeight,
|
||||
v.VotingPower,
|
||||
v.Accum)
|
||||
}
|
||||
@ -97,11 +94,10 @@ func RandValidator(randPower bool, minPower int64) (*Validator, *PrivValidator)
|
||||
votePower += int64(RandUint32())
|
||||
}
|
||||
val := &Validator{
|
||||
Address: privVal.Address,
|
||||
PubKey: privVal.PubKey,
|
||||
LastCommitHeight: 0,
|
||||
VotingPower: votePower,
|
||||
Accum: 0,
|
||||
Address: privVal.Address,
|
||||
PubKey: privVal.PubKey,
|
||||
VotingPower: votePower,
|
||||
Accum: 0,
|
||||
}
|
||||
return val, privVal
|
||||
}
|
||||
|
Reference in New Issue
Block a user