docs: add more details on Vote struct from /consensus_state (#5164)

Closes #2743
This commit is contained in:
Anton Kaliaev
2020-07-29 14:20:39 +04:00
committed by GitHub
parent bc8b3e830b
commit 4ab7b7d7ca
8 changed files with 101 additions and 10 deletions

View File

@@ -103,6 +103,17 @@ func (vote *Vote) Copy() *Vote {
return &voteCopy
}
// String returns a string representation of Vote.
//
// 1. validator index
// 2. first 6 bytes of validator address
// 3. height
// 4. round,
// 5. type byte
// 6. type string
// 7. first 6 bytes of block hash
// 8. first 6 bytes of signature
// 9. timestamp
func (vote *Vote) String() string {
if vote == nil {
return nilVoteStr