diff --git a/libs/autofile/cmd/logjack.go b/libs/autofile/cmd/logjack.go index aeb810252..17b482bed 100644 --- a/libs/autofile/cmd/logjack.go +++ b/libs/autofile/cmd/logjack.go @@ -13,7 +13,6 @@ import ( ) const Version = "0.0.1" -const sleepSeconds = 1 // Every second const readBufferSize = 1024 // 1KB at a time // Parse command-line options diff --git a/libs/bech32/bech32_test.go b/libs/bech32/bech32_test.go index a2c6c83fb..830942061 100644 --- a/libs/bech32/bech32_test.go +++ b/libs/bech32/bech32_test.go @@ -25,7 +25,7 @@ func TestEncodeAndDecode(t *testing.T) { if hrp != "shasum" { t.Error("Invalid hrp") } - if bytes.Compare(data, sum[:]) != 0 { + if !bytes.Equal(data, sum[:]) { t.Error("Invalid decode") } } diff --git a/libs/common/async.go b/libs/common/async.go index 7be09a3c1..e3293ab4c 100644 --- a/libs/common/async.go +++ b/libs/common/async.go @@ -76,17 +76,15 @@ func (trs *TaskResultSet) Reap() *TaskResultSet { func (trs *TaskResultSet) Wait() *TaskResultSet { for i := 0; i < len(trs.results); i++ { var trch = trs.chz[i] - select { - case result, ok := <-trch: - if ok { - // Write result. - trs.results[i] = taskResultOK{ - TaskResult: result, - OK: true, - } - } else { - // We already wrote it. + result, ok := <-trch + if ok { + // Write result. + trs.results[i] = taskResultOK{ + TaskResult: result, + OK: true, } + } else { + // We already wrote it. } } return trs diff --git a/libs/common/errors_test.go b/libs/common/errors_test.go index 16aede225..52c78a765 100644 --- a/libs/common/errors_test.go +++ b/libs/common/errors_test.go @@ -17,10 +17,8 @@ func TestErrorPanic(t *testing.T) { if r := recover(); r != nil { err = ErrorWrap(r, "This is the message in ErrorWrap(r, message).") } - return }() panic(pnk{"something"}) - return nil } var err = capturePanic() diff --git a/libs/db/debug_db.go b/libs/db/debug_db.go index 4619a83dd..bb361a266 100644 --- a/libs/db/debug_db.go +++ b/libs/db/debug_db.go @@ -7,10 +7,6 @@ import ( cmn "github.com/tendermint/tendermint/libs/common" ) -func _fmt(f string, az ...interface{}) string { - return fmt.Sprintf(f, az...) -} - //---------------------------------------- // debugDB