mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-06 21:36:26 +00:00
mempool: don't log message type mismatch in the default callback (#8969)
This commit is contained in:
@@ -462,6 +462,10 @@ func (txmp *TxMempool) Update(
|
||||
func (txmp *TxMempool) initialTxCallback(wtx *WrappedTx, res *abci.Response) {
|
||||
checkTxRes, ok := res.Value.(*abci.Response_CheckTx)
|
||||
if !ok {
|
||||
txmp.logger.Error("mempool: received incorrect result type in CheckTx callback",
|
||||
"expected", reflect.TypeOf(&abci.Response_CheckTx{}).Name(),
|
||||
"got", reflect.TypeOf(res.Value).Name(),
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -630,10 +634,8 @@ func (txmp *TxMempool) insertTx(wtx *WrappedTx) {
|
||||
func (txmp *TxMempool) recheckTxCallback(req *abci.Request, res *abci.Response) {
|
||||
checkTxRes, ok := res.Value.(*abci.Response_CheckTx)
|
||||
if !ok {
|
||||
txmp.logger.Error("mempool: received incorrect result type in CheckTx callback",
|
||||
"expected", reflect.TypeOf(&abci.Response_CheckTx{}).Name(),
|
||||
"got", reflect.TypeOf(res.Value).Name(),
|
||||
)
|
||||
// Don't log this; this is the default callback and other response types
|
||||
// can safely be ignored.
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user