Browse Source

Shorten consensus log events

pull/169/head
Jae Kwon 9 years ago
parent
commit
ab1e8a35c6
4 changed files with 9 additions and 5 deletions
  1. +1
    -1
      benchmarks/simu/counter.go
  2. +5
    -1
      types/block.go
  3. +2
    -2
      types/part_set.go
  4. +1
    -1
      types/validator.go

+ 1
- 1
benchmarks/simu/counter.go View File

@ -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()


+ 5
- 1
types/block.go View File

@ -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{


+ 2
- 2
types/part_set.go View File

@ -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)
}


+ 1
- 1
types/validator.go View File

@ -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,


Loading…
Cancel
Save