Skip to content

Commit

Permalink
remove unwanted logs in global fee (#2892)
Browse files Browse the repository at this point in the history
  • Loading branch information
sainoe authored Jan 19, 2024
1 parent 5e972f0 commit 59170a3
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions x/globalfee/ante/fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ func (mfd FeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, ne
allowedToBypassMinFee := allBypassMsgs && doesNotExceedMaxGasUsage

if allowedToBypassMinFee {
ctx.Logger().Info("Pass allowedToBypassMinFee check")
return next(ctx, tx, simulate)
}

Expand Down Expand Up @@ -159,8 +158,6 @@ func (mfd FeeDecorator) GetTxFeeRequired(ctx sdk.Context, tx sdk.FeeTx) (sdk.Coi
return sdk.Coins{}, err
}

ctx.Logger().Info(fmt.Sprintf("GlobalFees: %v, IsCheckTx: %v", globalFees, ctx.IsCheckTx()))

// In DeliverTx, the global fee min gas prices are the only tx fee requirements.
if !ctx.IsCheckTx() {
return globalFees, nil
Expand All @@ -171,10 +168,7 @@ func (mfd FeeDecorator) GetTxFeeRequired(ctx sdk.Context, tx sdk.FeeTx) (sdk.Coi

// Get local minimum-gas-prices
localFees := GetMinGasPrice(ctx, int64(tx.GetGas()))
ctx.Logger().Info(fmt.Sprintf("localFees: %v, IsCheckTx: %v", localFees, ctx.IsCheckTx()))

c, err := CombinedFeeRequirement(globalFees, localFees)
ctx.Logger().Info(fmt.Sprintf("CombinedFeeRequirement: %v, IsCheckTx: %v", c, ctx.IsCheckTx()))

// Return combined fee requirements
return c, err
Expand Down Expand Up @@ -224,11 +218,8 @@ func (mfd FeeDecorator) DefaultZeroGlobalFee(ctx sdk.Context) ([]sdk.DecCoin, er

func (mfd FeeDecorator) ContainsOnlyBypassMinFeeMsgs(ctx sdk.Context, msgs []sdk.Msg) bool {
bypassMsgTypes := mfd.GetBypassMsgTypes(ctx)
ctx.Logger().Info(fmt.Sprintf("BypassMsgs: %v", bypassMsgTypes))

for _, msg := range msgs {
ctx.Logger().Info(fmt.Sprintf("TxBypassMsg: %v", sdk.MsgTypeURL(msg)))

if tmstrings.StringInSlice(sdk.MsgTypeURL(msg), bypassMsgTypes) {
continue
}
Expand Down

0 comments on commit 59170a3

Please sign in to comment.