libs: Remove usage of custom Fmt, in favor of fmt.Sprintf (#2199)

* libs: Remove usage of custom Fmt, in favor of fmt.Sprintf

Closes #2193

* Fix bug that was masked by custom Fmt!
This commit is contained in:
Dev Ojha
2018-08-10 00:25:57 -05:00
committed by Anton Kaliaev
parent fc7c298cc0
commit 2756be5a59
88 changed files with 270 additions and 275 deletions

View File

@@ -312,7 +312,7 @@ func (mem *Mempool) resCbRecheck(req *abci.Request, res *abci.Response) {
case *abci.Response_CheckTx:
memTx := mem.recheckCursor.Value.(*mempoolTx)
if !bytes.Equal(req.GetCheckTx().Tx, memTx.tx) {
cmn.PanicSanity(cmn.Fmt("Unexpected tx response from proxy during recheck\n"+
cmn.PanicSanity(fmt.Sprintf("Unexpected tx response from proxy during recheck\n"+
"Expected %X, got %X", r.CheckTx.Data, memTx.tx))
}
if r.CheckTx.Code == abci.CodeTypeOK {

View File

@@ -14,7 +14,6 @@ import (
"github.com/tendermint/tendermint/abci/example/counter"
"github.com/tendermint/tendermint/abci/example/kvstore"
abci "github.com/tendermint/tendermint/abci/types"
cmn "github.com/tendermint/tendermint/libs/common"
"github.com/tendermint/tendermint/libs/log"
cfg "github.com/tendermint/tendermint/config"
@@ -151,7 +150,7 @@ func TestSerialReap(t *testing.T) {
reapCheck := func(exp int) {
txs := mempool.Reap(-1)
require.Equal(t, len(txs), exp, cmn.Fmt("Expected to reap %v txs but got %v", exp, len(txs)))
require.Equal(t, len(txs), exp, fmt.Sprintf("Expected to reap %v txs but got %v", exp, len(txs)))
}
updateRange := func(start, end int) {