You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Through the CLIContext, we can broadcast signed txs in one of three ways: async, sync, and block via node.BroadcastTx*. Regardless of the mode, all the modes return a (Result*, error).
Problem Definition
When calling node.BroadcastTx* we get no error and a valid Result* if the tx successfully executed (depending on the mode). This means the client will get a TxResponse returned back.
However, there are a few cases where an error can be returned from Tendermint because the tx wasn't even executed at all. Namely, ErrTxTooLarge, ErrPreCheck, and ErrTxInCache. When these errors are returned, it would be nice for clients to still get back a TxResponse with an appropriate code.
Proposal
During node.BroadcastTx*, intercept the error and check if it's any of the above mentioned. If so, map that to an SDK error code and return a TxResponse.
Summary
Through the
CLIContext
, we can broadcast signed txs in one of three ways:async
,sync
, andblock
vianode.BroadcastTx*
. Regardless of the mode, all the modes return a(Result*, error)
.Problem Definition
When calling
node.BroadcastTx*
we get no error and a validResult*
if the tx successfully executed (depending on the mode). This means the client will get aTxResponse
returned back.However, there are a few cases where an error can be returned from Tendermint because the tx wasn't even executed at all. Namely,
ErrTxTooLarge
,ErrPreCheck
, andErrTxInCache
. When these errors are returned, it would be nice for clients to still get back aTxResponse
with an appropriatecode
.Proposal
During
node.BroadcastTx*
, intercept the error and check if it's any of the above mentioned. If so, map that to an SDK error code and return aTxResponse
.e.g.
For Admin Use
The text was updated successfully, but these errors were encountered: