Skip to content

log issue in resCbRecheck #3214

@rickyyangz

Description

@rickyyangz

func (mem *Mempool) resCbRecheck(req *abci.Request, res *abci.Response) {
switch r := res.Value.(type) {
case *abci.Response_CheckTx:
tx := req.GetCheckTx().Tx
memTx := mem.recheckCursor.Value.(*mempoolTx)
if !bytes.Equal(req.GetCheckTx().Tx, memTx.tx) {
cmn.PanicSanity(
fmt.Sprintf(
"Unexpected tx response from proxy during recheck\nExpected %X, got %X",
r.CheckTx.Data,
memTx.tx,
),
)
}

The log

fmt.Sprintf( "Unexpected tx response from proxy during recheck\nExpected %X, got %X", r.CheckTx.Data, memTx.tx, )

is not correct, the expected is the Response while the got is Request which makes the comparison confusing.

I think it can be changed to

fmt.Sprintf( "Unexpected tx response from proxy during recheck\nExpected %X, got %X", req.GetCheckTx().Tx, memTx.tx, )

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions