From cd20b8ca81d3329dbec0867aab49cd94e48f4681 Mon Sep 17 00:00:00 2001 From: Paul Chen Date: Thu, 7 Sep 2023 18:52:21 +0800 Subject: [PATCH] feat: make CheckTxFeeWithValidatorMinGasPrices public --- x/auth/ante/fee.go | 2 +- x/auth/ante/validator_tx_fee.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/x/auth/ante/fee.go b/x/auth/ante/fee.go index 7581765ecf7..687d173a1b7 100644 --- a/x/auth/ante/fee.go +++ b/x/auth/ante/fee.go @@ -28,7 +28,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{ diff --git a/x/auth/ante/validator_tx_fee.go b/x/auth/ante/validator_tx_fee.go index fdde15ec864..64d54fbb2c6 100644 --- a/x/auth/ante/validator_tx_fee.go +++ b/x/auth/ante/validator_tx_fee.go @@ -10,9 +10,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, errorsmod.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx")