mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-20 15:04:22 +00:00
types: fix formatting when printing signatures
- use cmn.Fingerprint and %X
This commit is contained in:
+5
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user