types: fix formatting when printing signatures

- use cmn.Fingerprint and %X
This commit is contained in:
Ethan Buchman
2018-08-05 16:35:43 -04:00
parent 8bd514d9fb
commit 309a6772d7
3 changed files with 17 additions and 13 deletions
+5 -2
View File
@@ -4,6 +4,8 @@ import (
"errors"
"fmt"
"time"
cmn "github.com/tendermint/tendermint/libs/common"
)
var (
@@ -41,9 +43,10 @@ func NewProposal(height int64, round int, blockPartsHeader PartSetHeader, polRou
// String returns a string representation of the Proposal.
func (p *Proposal) String() string {
return fmt.Sprintf("Proposal{%v/%v %v (%v,%v) %v @ %s}",
return fmt.Sprintf("Proposal{%v/%v %v (%v,%v) %X @ %s}",
p.Height, p.Round, p.BlockPartsHeader, p.POLRound,
p.POLBlockID, p.Signature, CanonicalTime(p.Timestamp))
p.POLBlockID,
cmn.Fingerprint(p.Signature), CanonicalTime(p.Timestamp))
}
// SignBytes returns the Proposal bytes for signing