Skip to content

Commit

Permalink
feat: make CheckTxFeeWithValidatorMinGasPrices public
Browse files Browse the repository at this point in the history
(cherry picked from commit 0d75d01)
  • Loading branch information
dadamu authored and RiccardoM committed Nov 8, 2023
1 parent c98f99a commit 44b17e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion x/auth/ante/fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type DeductFeeDecorator struct {

func NewDeductFeeDecorator(ak AccountKeeper, bk types.BankKeeper, fk FeegrantKeeper, tfc TxFeeChecker) DeductFeeDecorator {
if tfc == nil {
tfc = checkTxFeeWithValidatorMinGasPrices
tfc = CheckTxFeeWithValidatorMinGasPrices
}

return DeductFeeDecorator{
Expand Down
4 changes: 2 additions & 2 deletions x/auth/ante/validator_tx_fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)

// checkTxFeeWithValidatorMinGasPrices implements the default fee logic, where the minimum price per
// CheckTxFeeWithValidatorMinGasPrices implements the default fee logic, where the minimum price per
// unit of gas is fixed and set by each validator, can the tx priority is computed from the gas price.
func checkTxFeeWithValidatorMinGasPrices(ctx sdk.Context, tx sdk.Tx) (sdk.Coins, int64, error) {
func CheckTxFeeWithValidatorMinGasPrices(ctx sdk.Context, tx sdk.Tx) (sdk.Coins, int64, error) {
feeTx, ok := tx.(sdk.FeeTx)
if !ok {
return nil, 0, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx")
Expand Down

0 comments on commit 44b17e8

Please sign in to comment.