diff options
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus/core/types')
5 files changed, 11 insertions, 9 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/types/block-randomness.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/types/block-randomness.go index 1eaa3e398..6df245b08 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus/core/types/block-randomness.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/types/block-randomness.go @@ -31,8 +31,8 @@ type AgreementResult struct { } func (r *AgreementResult) String() string { - return fmt.Sprintf( - "agreementResult[%s:%s]", r.BlockHash, &r.Position) + return fmt.Sprintf("agreementResult{Hash:%s %s}", + r.BlockHash.String()[:6], &r.Position) } // BlockRandomnessResult describes a block randomness result diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/types/block.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/types/block.go index b24e1f715..f42b70267 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus/core/types/block.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/types/block.go @@ -221,7 +221,7 @@ func (b *Block) DecodeRLP(s *rlp.Stream) error { } func (b *Block) String() string { - return fmt.Sprintf("Block(%v:%s)", b.Hash.String()[:6], &b.Position) + return fmt.Sprintf("Block{Hash:%v %s}", b.Hash.String()[:6], &b.Position) } // Clone returns a deep copy of a block. diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/types/dkg/dkg.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/types/dkg/dkg.go index 4053c5a28..cecc4f16c 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus/core/types/dkg/dkg.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/types/dkg/dkg.go @@ -61,7 +61,7 @@ type MasterPublicKey struct { } func (d *MasterPublicKey) String() string { - return fmt.Sprintf("MasterPublicKey[%s:%d]", + return fmt.Sprintf("MasterPublicKey{KP:%s Round:%d}", d.ProposerID.String()[:6], d.Round) } @@ -141,11 +141,11 @@ type Complaint struct { func (c *Complaint) String() string { if c.IsNack() { - return fmt.Sprintf("DKGNackComplaint[%s:%d]%s", + return fmt.Sprintf("DKGNackComplaint{CP:%s Round:%d PSP:%s}", c.ProposerID.String()[:6], c.Round, c.PrivateShare.ProposerID.String()[:6]) } - return fmt.Sprintf("Complaint[%s:%d]%v", + return fmt.Sprintf("DKGComplaint{CP:%s Round:%d PrivateShare:%v}", c.ProposerID.String()[:6], c.Round, c.PrivateShare) } @@ -175,7 +175,7 @@ type Finalize struct { } func (final *Finalize) String() string { - return fmt.Sprintf("DKGFinal[%s:%d]", + return fmt.Sprintf("DKGFinal{FP:%s Round:%d}", final.ProposerID.String()[:6], final.Round) } diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/types/position.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/types/position.go index 1fc7e6bf4..8822f6ea9 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus/core/types/position.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/types/position.go @@ -29,7 +29,8 @@ type Position struct { } func (pos *Position) String() string { - return fmt.Sprintf("[%d:%d:%d]", pos.Round, pos.ChainID, pos.Height) + return fmt.Sprintf("Position{Round:%d Chain:%d Height:%d}", + pos.Round, pos.ChainID, pos.Height) } // Equal checks if two positions are equal, it panics when their chainIDs diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/types/vote.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/types/vote.go index 12c3af892..7601542ae 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus/core/types/vote.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/types/vote.go @@ -52,7 +52,8 @@ type Vote struct { } func (v *Vote) String() string { - return fmt.Sprintf("Vote[%s:%s](%d:%d):%s", v.ProposerID.String()[:6], + return fmt.Sprintf("Vote{BP:%s %s Period:%d Type:%d Hash:%s}", + v.ProposerID.String()[:6], &v.Position, v.Period, v.Type, v.BlockHash.String()[:6]) } |