From 09dd7daa80b0f8b868063b473f3994372a7d1c99 Mon Sep 17 00:00:00 2001 From: javiersuweijie Date: Mon, 2 Oct 2023 10:43:04 +0800 Subject: [PATCH 1/2] fix: init builder module account during upgrade --- app/app.go | 1 + app/upgrades/v2.5/upgrade.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/app/app.go b/app/app.go index da3bc4e5..3b6cc5c8 100644 --- a/app/app.go +++ b/app/app.go @@ -1162,6 +1162,7 @@ func (app *TerraApp) RegisterUpgradeHandlers(cfg module.Configurator) { app.ConsensusParamsKeeper, app.ICAControllerKeeper, app.BuilderKeeper, + app.AccountKeeper, ), ) } diff --git a/app/upgrades/v2.5/upgrade.go b/app/upgrades/v2.5/upgrade.go index a732a323..656f9250 100644 --- a/app/upgrades/v2.5/upgrade.go +++ b/app/upgrades/v2.5/upgrade.go @@ -1,6 +1,7 @@ package v2_5 import ( + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" pobkeeper "github.com/skip-mev/pob/x/builder/keeper" pobtypes "github.com/skip-mev/pob/x/builder/types" "time" @@ -31,6 +32,7 @@ func CreateUpgradeHandler( consensusParamsKeeper consensuskeeper.Keeper, icacontrollerKeeper icacontrollerkeeper.Keeper, pobKeeper pobkeeper.Keeper, + authKeeper authkeeper.AccountKeeper, ) upgradetypes.UpgradeHandler { return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { // READ: https://github.com/cosmos/cosmos-sdk/blob/v0.47.4/UPGRADING.md#xconsensus @@ -60,6 +62,9 @@ func CreateUpgradeHandler( return nil, err } + // Create POB module account + _ = authKeeper.GetModuleAccount(ctx, pobtypes.ModuleName) + // Setting pob params to disable by default until a proposal is passed to enable it err = pobKeeper.SetParams(ctx, pobtypes.Params{ MaxBundleSize: 0, From 4217102715fc8898e23e63b1073d5c7fc3200014 Mon Sep 17 00:00:00 2001 From: emidev98 Date: Mon, 9 Oct 2023 10:46:52 +0300 Subject: [PATCH 2/2] chore: codecov remove test_helpers --- .codecov.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.codecov.yml b/.codecov.yml index f06bfa24..6667698f 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -35,3 +35,4 @@ ignore: - "**/*.pb.gw.go" - "**/test_utils.go" - "**/module.go" + - "**/test_helpers.go"