add error log

This commit is contained in:
William Banfield
2021-10-15 15:32:08 -04:00
parent 1ee3b70698
commit 8750c7c03b
+5
View File
@@ -5,6 +5,7 @@ import (
"context"
"errors"
"fmt"
"reflect"
"sync/atomic"
"time"
@@ -640,6 +641,10 @@ func (txmp *TxMempool) defaultTxCallback(req *abci.Request, res *abci.Response)
checkTxRes, ok := res.Value.(*abci.Response_CheckTx)
if !ok {
txmp.logger.Error("received incorrect type in mempool callback",
"expected", reflect.TypeOf(&abci.Response_CheckTx{}).Name(),
"got", reflect.TypeOf(res.Value).Name(),
)
return
}
tx := req.GetCheckTx().Tx