Skip to content

Commit

Permalink
chg: delete pulp related files / fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
marcello33 committed Jan 29, 2024
1 parent d2cc050 commit a34d0f9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 136 deletions.
2 changes: 1 addition & 1 deletion client/keys/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func MkConsKeyOutput(k *keyring.Record) (KeyOutput, error) {
return NewKeyOutput(k.Name, k.GetType(), addr, pk)
}

// MkValKeyOutput create a KeyOutput or Vals
// MkValKeyOutput create a KeyOutput for Vals
func MkValKeyOutput(k *keyring.Record) (KeyOutput, error) {
pk, err := k.GetPubKey()
if err != nil {
Expand Down
42 changes: 22 additions & 20 deletions x/auth/ante/validator_tx_fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,35 @@ func checkTxFeeWithValidatorMinGasPrices(ctx sdk.Context, tx sdk.Tx, params type
return nil, 0, errorsmod.Wrap(sdkerrors.ErrInvalidTxFees, "must provide correct txFees")
}

// TODO HV2: gas is retrieved from Params as currently done in heimdall. Can this be changed
// TODO HV2: gas is retrieved from Params as currently done in heimdall
gas := params.GetMaxTxGas()
feeCoins := sdk.Coins{sdk.Coin{Denom: types.FeeToken, Amount: amount}}

// TODO HV2: removed as not present in heimdall
// Ensure that the provided fees meet a minimum threshold for the validator,
// if this is a CheckTx. This is only for local mempool purposes, and thus
// is only ran on check tx.
//if ctx.IsCheckTx() {
//
// minGasPrices := ctx.MinGasPrices()
// if !minGasPrices.IsZero() {
// requiredFees := make(sdk.Coins, len(minGasPrices))
//
// // Determine the required fees by multiplying each required minimum gas
// // price by the gas limit, where fee = ceil(minGasPrice * gasLimit).
// glDec := sdkmath.LegacyNewDec(int64(gas))
// for i, gp := range minGasPrices {
// fee := gp.Amount.Mul(glDec)
// requiredFees[i] = sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt())
// }
//
// if !feeCoins.IsAnyGTE(requiredFees) {
// return nil, 0, errorsmod.Wrapf(sdkerrors.ErrInsufficientFee, "insufficient fees; got: %s required: %s", feeCoins, requiredFees)
// }
// }
//}
/*
if ctx.IsCheckTx() {
minGasPrices := ctx.MinGasPrices()
if !minGasPrices.IsZero() {
requiredFees := make(sdk.Coins, len(minGasPrices))
// Determine the required fees by multiplying each required minimum gas
// price by the gas limit, where fee = ceil(minGasPrice * gasLimit).
glDec := sdkmath.LegacyNewDec(int64(gas))
for i, gp := range minGasPrices {
fee := gp.Amount.Mul(glDec)
requiredFees[i] = sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt())
}
if !feeCoins.IsAnyGTE(requiredFees) {
return nil, 0, errorsmod.Wrapf(sdkerrors.ErrInsufficientFee, "insufficient fees; got: %s required: %s", feeCoins, requiredFees)
}
}
}
*/

priority := getTxPriority(feeCoins, int64(gas))
return feeCoins, priority, nil
Expand Down
88 changes: 0 additions & 88 deletions x/auth/types/pulp.go

This file was deleted.

27 changes: 0 additions & 27 deletions x/auth/types/pulp_test.go

This file was deleted.

0 comments on commit a34d0f9

Please sign in to comment.