mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-03 19:53:58 +00:00
Align Vote/Proposal fields with canonical order and fields (#2730)
* reorder fields * add TestVoteString & update tests * remove redundant info from Proposal.String() * update spec * revert changes on vote.String() -> more human friendly
This commit is contained in:
committed by
Ethan Buchman
parent
60437953ac
commit
a530352f61
@@ -48,13 +48,13 @@ type Address = crypto.Address
|
||||
|
||||
// Represents a prevote, precommit, or commit vote from validators for consensus.
|
||||
type Vote struct {
|
||||
ValidatorAddress Address `json:"validator_address"`
|
||||
ValidatorIndex int `json:"validator_index"`
|
||||
Type SignedMsgType `json:"type"`
|
||||
Height int64 `json:"height"`
|
||||
Round int `json:"round"`
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
Type SignedMsgType `json:"type"`
|
||||
BlockID BlockID `json:"block_id"` // zero if vote is nil.
|
||||
ValidatorAddress Address `json:"validator_address"`
|
||||
ValidatorIndex int `json:"validator_index"`
|
||||
Signature []byte `json:"signature"`
|
||||
}
|
||||
|
||||
@@ -94,7 +94,8 @@ func (vote *Vote) String() string {
|
||||
typeString,
|
||||
cmn.Fingerprint(vote.BlockID.Hash),
|
||||
cmn.Fingerprint(vote.Signature),
|
||||
CanonicalTime(vote.Timestamp))
|
||||
CanonicalTime(vote.Timestamp),
|
||||
)
|
||||
}
|
||||
|
||||
func (vote *Vote) Verify(chainID string, pubKey crypto.PubKey) error {
|
||||
|
||||
Reference in New Issue
Block a user