Skip to content

Commit

Permalink
don't check gas price in simulation mode
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Jul 15, 2022
1 parent adaa3a8 commit 5813149
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions x/auth/ante/fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,14 @@ func (dfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bo
return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidGasLimit, "must provide positive gas")
}

fee, priority, err := dfd.txFeeChecker(ctx, tx)
if err != nil {
return ctx, err
var err error
var priority int64
fee := feeTx.GetFee()
if !simulate {
fee, priority, err = dfd.txFeeChecker(ctx, tx)
if err != nil {
return ctx, err
}
}
if err := dfd.checkDeductFee(ctx, tx, fee); err != nil {
return ctx, err
Expand Down

0 comments on commit 5813149

Please sign in to comment.