mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 12:51:22 +00:00
Make code smell better
This commit is contained in:
@ -86,6 +86,22 @@ func (t *transacter) Start() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// WaitUntilAllConnectionsStartedFiringTxs waits until all of this
|
||||
// transacters connections have begun sending txs at the specified rate
|
||||
func (t *transacter) WaitUntilAllConnectionsStartedFiringTxs() {
|
||||
for {
|
||||
started := true
|
||||
for i := 0; i < t.Connections; i++ {
|
||||
if !t.connsStarted[i] && !t.connsBroken[i] {
|
||||
started = false
|
||||
}
|
||||
}
|
||||
if started {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Stop closes the connections.
|
||||
func (t *transacter) Stop() {
|
||||
t.stopped = true
|
||||
|
Reference in New Issue
Block a user