Skip to content

Commit

Permalink
add env var to disable consumer fee market
Browse files Browse the repository at this point in the history
  • Loading branch information
sainoe committed Jan 28, 2025
1 parent 68c72d8 commit 45d7ae3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ test-interchain-neutron:
CONSUMER_BINARY="neutrond" \
CONSUMER_BECH32_PREFIX="neutron" \
CONSUMER_DENOM="untrn" \
CONUSUMER_DISABLE_FEEMARKET="true" \
go test -run TestProviderConsumersSuite -count=1 -v -timeout 30m

# run mbt tests
Expand Down
9 changes: 8 additions & 1 deletion tests/interchain/chainsuite/chain_spec_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,18 @@ func GetConsumerSpec(ctx context.Context, providerChain *Chain, proposalMsg *pro
}

func consumerModifiedGenesis() []cosmos.GenesisKV {
return []cosmos.GenesisKV{
gen := []cosmos.GenesisKV{
cosmos.NewGenesisKV("app_state.slashing.params.signed_blocks_window", strconv.Itoa(SlashingWindowConsumer)),
cosmos.NewGenesisKV("consensus.params.block.max_gas", "50000000"),
cosmos.NewGenesisKV("app_state.ccvconsumer.params.soft_opt_out_threshold", "0.0"),
cosmos.NewGenesisKV("app_state.ccvconsumer.params.blocks_per_distribution_transmission", BlocksPerDistribution),
cosmos.NewGenesisKV("app_state.ccvconsumer.params.reward_denoms", []string{ConsumerDenom()}),
cosmos.NewGenesisKV("app_state.feemarket.params.enabled", false),
}

if ConsumerDisableFeeMarket() {
gen = append(gen, cosmos.NewGenesisKV("app_state.feemarket.params.enabled", false))
}

return gen
}
7 changes: 7 additions & 0 deletions tests/interchain/chainsuite/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package chainsuite

import (
"os"
"strings"
"time"

"github.com/strangelove-ventures/interchaintest/v8/testutil"
Expand Down Expand Up @@ -127,6 +128,12 @@ func ConsumerDenom() string {
return denom
}

func ConsumerDisableFeeMarket() bool {
res := os.Getenv("CONSUMER_DISABLE_FEEMARKET")

return strings.ToLower(res) == "true"
}

func getImageName(imgName string) string {
imageName := os.Getenv(imgName)
if imageName == "" {
Expand Down

0 comments on commit 45d7ae3

Please sign in to comment.