mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-26 19:21:44 +00:00
[tm-bench] nice formatting for error
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
|||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -47,8 +48,8 @@ func (t *transacter) Start() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t.wg.Add(t.Connections)
|
||||||
for i := 0; i < t.Connections; i++ {
|
for i := 0; i < t.Connections; i++ {
|
||||||
t.wg.Add(1)
|
|
||||||
go t.sendLoop(i)
|
go t.sendLoop(i)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +85,8 @@ func (t *transacter) sendLoop(connIndex int) {
|
|||||||
Params: []interface{}{hex.EncodeToString(tx)},
|
Params: []interface{}{hex.EncodeToString(tx)},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(errors.Wrap(err, fmt.Sprintf("lost connection to %s", conn.Address)))
|
fmt.Printf("Lost connection to %s. Please restart the test.\nDetails:\n%v", conn.Address, err)
|
||||||
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
num++
|
num++
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user