Skip to content

Commit

Permalink
update error log
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaru Wang committed May 5, 2023
1 parent cd497a5 commit 2376c3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x/globalfee/ante/fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (mfd FeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, ne

// reject the transaction early if the feeCoins have more denoms than the fee requirement
if feeCoins.Len() > requiredGlobalFees.Len() {
return ctx, sdkerrors.Wrapf(sdkerrors.ErrInvalidCoins, "fee is not a subset of required fees; got %s, required: %s", feeCoins, requiredGlobalFees)
return ctx, sdkerrors.Wrapf(sdkerrors.ErrInvalidCoins, "fee is not a subset of required fees; got %s, required: %s", feeCoins.String(), requiredGlobalFees.String())
}

// Get local minimum-gas-prices
Expand All @@ -100,7 +100,7 @@ func (mfd FeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, ne
// if feeCoinsNoZeroDenom=[], DenomsSubsetOf returns true
// if feeCoinsNoZeroDenom is not empty, but nonZeroCoinFeesReq empty, return false
if !feeCoinsNonZeroDenom.DenomsSubsetOf(nonZeroCoinFeesReq) {
return ctx, sdkerrors.Wrapf(sdkerrors.ErrInvalidCoins, "fee is not a subset of required fees; got %s, required: %s", feeCoins, combinedFeeRequirement)
return ctx, sdkerrors.Wrapf(sdkerrors.ErrInvalidCoins, "fee is not a subset of required fees; got %s, required: %s", feeCoins.String(), combinedFeeRequirement.String())
}

// Accept zero fee transactions only if both of the following statements are true:
Expand Down Expand Up @@ -137,7 +137,7 @@ func (mfd FeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, ne
// because when nonZeroCoinFeesReq empty, and DenomsSubsetOf check passed,
// the tx should already passed before)
if !feeCoinsNonZeroDenom.IsAnyGTE(nonZeroCoinFeesReq) {
return ctx, sdkerrors.Wrapf(sdkerrors.ErrInsufficientFee, "insufficient fees; got: %s required: %s", feeCoins, combinedFeeRequirement)
return ctx, sdkerrors.Wrapf(sdkerrors.ErrInsufficientFee, "insufficient fees; got: %s required: %s", feeCoins.String(), combinedFeeRequirement.String())
}
}

Expand Down

0 comments on commit 2376c3b

Please sign in to comment.