abci: strip mempoolerror from responsechectx (#8620)

* abci:mempoolError from ResponseCheckTx
* responseCheckTx returns an error if Tendermint decides not to accept an app after CheckTx
*updated spec, upgrading.md and changelog.md
This commit is contained in:
Jasmina Malicevic
2022-05-26 11:18:27 +02:00
committed by GitHub
parent b0ec8a0ea7
commit cb9722c2b0
29 changed files with 418 additions and 948 deletions

View File

@@ -54,11 +54,10 @@ func (env *Environment) BroadcastTxSync(ctx context.Context, req *coretypes.Requ
return nil, fmt.Errorf("broadcast confirmation not received: %w", ctx.Err())
case r := <-resCh:
return &coretypes.ResultBroadcastTx{
Code: r.Code,
Data: r.Data,
Codespace: r.Codespace,
MempoolError: r.MempoolError,
Hash: req.Tx.Hash(),
Code: r.Code,
Data: r.Data,
Codespace: r.Codespace,
Hash: req.Tx.Hash(),
}, nil
}
}
@@ -90,7 +89,7 @@ func (env *Environment) BroadcastTxCommit(ctx context.Context, req *coretypes.Re
return &coretypes.ResultBroadcastTxCommit{
CheckTx: *r,
Hash: req.Tx.Hash(),
}, fmt.Errorf("transaction encountered error (%s)", r.MempoolError)
}, fmt.Errorf("wrong ABCI CodeType, got (%d) instead of OK", r.Code)
}
if !indexer.KVSinkEnabled(env.EventSinks) {