diff --git a/benchmarks/simu/counter.go b/benchmarks/simu/counter.go index 8b0ba180..25b7703e 100644 --- a/benchmarks/simu/counter.go +++ b/benchmarks/simu/counter.go @@ -49,7 +49,7 @@ func main() { if i%1000 == 0 { fmt.Println(i) } - time.Sleep(time.Microsecond * 1) + time.Sleep(time.Microsecond * 250) } ws.Stop() diff --git a/types/block.go b/types/block.go index 752d6a56..e574f289 100644 --- a/types/block.go +++ b/types/block.go @@ -343,8 +343,12 @@ func (data *Data) StringIndented(indent string) string { if data == nil { return "nil-Data" } - txStrings := make([]string, len(data.Txs)) + txStrings := make([]string, MinInt(len(data.Txs), 21)) for i, tx := range data.Txs { + if i == 20 { + txStrings[i] = fmt.Sprintf("... (%v total)", len(data.Txs)) + break + } txStrings[i] = fmt.Sprintf("Tx:%v", tx) } return fmt.Sprintf(`Data{ diff --git a/types/part_set.go b/types/part_set.go index fc082667..9ab557bd 100644 --- a/types/part_set.go +++ b/types/part_set.go @@ -49,10 +49,10 @@ func (part *Part) String() string { func (part *Part) StringIndented(indent string) string { return fmt.Sprintf(`Part{ %s Proof: %v -%s Bytes: %X +%s Bytes: %X... %s}`, indent, part.Proof.StringIndented(indent+" "), - indent, part.Bytes, + indent, Fingerprint(part.Bytes), indent) } diff --git a/types/validator.go b/types/validator.go index d7fdb3b9..f68f5892 100644 --- a/types/validator.go +++ b/types/validator.go @@ -53,7 +53,7 @@ func (v *Validator) String() string { if v == nil { return "nil-Validator" } - return fmt.Sprintf("Validator{%X %v %v-%v-%v VP:%v A:%v}", + return fmt.Sprintf("Validator{%X %v %v VP:%v A:%v}", v.Address, v.PubKey, v.LastCommitHeight,