diff --git a/app/process_proposal.go b/app/process_proposal.go index 7b51634c80..fa9e444b00 100644 --- a/app/process_proposal.go +++ b/app/process_proposal.go @@ -68,6 +68,11 @@ func (app *App) ProcessProposal(req abci.RequestProcessProposal) (resp abci.Resp } sdkTx, err := app.txConfig.TxDecoder()(tx) + // Set the tx bytes in the context for app version v3 and greater + if sdkCtx.BlockHeader().Version.App >= 3 { + sdkCtx = sdkCtx.WithTxBytes(tx) + } + if err != nil { if req.Header.Version.App == v1 { // For appVersion 1, there was no block validity rule that all @@ -90,9 +95,6 @@ func (app *App) ProcessProposal(req abci.RequestProcessProposal) (resp abci.Resp return reject() } - // Set the tx size on the context before calling the AnteHandler - sdkCtx = sdkCtx.WithTxBytes(tx) - // we need to increment the sequence for every transaction so that // the signature check below is accurate. this error only gets hit // if the account in question doesn't exist. @@ -118,11 +120,6 @@ func (app *App) ProcessProposal(req abci.RequestProcessProposal) (resp abci.Resp return reject() } - // set the tx bytes in the context for app version v3 and greater - if sdkCtx.BlockHeader().Version.App >= 3 { - sdkCtx = sdkCtx.WithTxBytes(tx) - } - // validated the PFB signature sdkCtx, err = handler(sdkCtx, sdkTx, false) if err != nil {