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)
(cherry picked from commit 44b17e8)
  • Loading branch information
dadamu committed Apr 9, 2024
1 parent a9aa00c commit 0841bc5
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 0841bc5

Please sign in to comment.