Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CNS upgrade plan 0.5.0 #284

Merged
merged 3 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ import (
"github.com/ignite-hq/cli/ignite/pkg/openapiconsole"
"github.com/lavanet/lava/app/keepers"
"github.com/lavanet/lava/app/upgrades"
"github.com/lavanet/lava/app/upgrades/v0_4_6"
"github.com/lavanet/lava/app/upgrades/v0_5_0"
"github.com/lavanet/lava/docs"
conflictmodule "github.com/lavanet/lava/x/conflict"
conflictmodulekeeper "github.com/lavanet/lava/x/conflict/keeper"
Expand Down Expand Up @@ -116,7 +116,7 @@ const (
)

// Upgrades add here future upgrades (upgrades.Upgrade)
var Upgrades = []upgrades.Upgrade{upgrades.Upgrade_0_4_0, upgrades.Upgrade_0_4_3, upgrades.Upgrade_0_4_4, upgrades.Upgrade_0_4_5, v0_4_6.Upgrade_v0_4_6}
var Upgrades = []upgrades.Upgrade{upgrades.Upgrade_0_4_0, upgrades.Upgrade_0_4_3, upgrades.Upgrade_0_4_4, upgrades.Upgrade_0_4_5, v0_5_0.Upgrade}

// this line is used by starport scaffolding # stargate/wasm/app/enabledProposals

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v0_4_6
package v0_5_0

import (
"log"
Expand All @@ -13,9 +13,9 @@ import (
spectypes "github.com/lavanet/lava/x/spec/types"
)

const UpgradeName = "v0.4.6"
const UpgradeName = "v0.5.0"

var Upgrade_v0_4_6 = upgrades.Upgrade{
var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName, // upgrade name defined few lines above
CreateUpgradeHandler: CreateUpgradeHandler, // create CreateUpgradeHandler in upgrades.go below
StoreUpgrades: store.StoreUpgrades{}, // StoreUpgrades has 3 fields: Added/Renamed/Deleted any module that fits these description should be added in the way below
Expand Down
4 changes: 2 additions & 2 deletions x/epochstorage/keeper/stake_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func (k Keeper) RemoveStakeEntryCurrent(ctx sdk.Context, storageType string, cha
func (k Keeper) AppendStakeEntryCurrent(ctx sdk.Context, storageType string, chainID string, stakeEntry types.StakeEntry) {
// this stake storage entries are sorted by stake amount
stakeStorage, found := k.GetStakeStorageCurrent(ctx, storageType, chainID)
entries := []types.StakeEntry{}
var entries []types.StakeEntry
if !found {
entries = []types.StakeEntry{stakeEntry}
// create a new one
Expand Down Expand Up @@ -354,7 +354,7 @@ func (k Keeper) AppendUnstakeEntry(ctx sdk.Context, storageType string, stakeEnt

// this stake storage entries are sorted by deadline
stakeStorage, found := k.GetStakeStorageUnstake(ctx, storageType)
entries := []types.StakeEntry{}
var entries []types.StakeEntry
if !found {
entries = []types.StakeEntry{stakeEntry}
// create a new one
Expand Down