File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package app
3
3
import (
4
4
"context"
5
5
"fmt"
6
+ storetypes "github.com/cosmos/cosmos-sdk/store/types"
6
7
"io"
7
8
"os"
8
9
"path/filepath"
@@ -651,6 +652,19 @@ func New(
651
652
app .sm .RegisterStoreDecoders ()
652
653
653
654
app .RegisterUpgradeHandlers ()
655
+ upgradeInfo , err := app .UpgradeKeeper .ReadUpgradeInfoFromDisk ()
656
+ if err != nil {
657
+ panic (err )
658
+ }
659
+
660
+ if upgradeInfo .Name == "1.0.4beta" && ! app .UpgradeKeeper .IsSkipHeight (upgradeInfo .Height ) {
661
+ storeUpgrades := storetypes.StoreUpgrades {
662
+ Added : []string {oracletypes .StoreKey },
663
+ }
664
+
665
+ // configure store loader that checks if version == upgradeHeight and applies store upgrades
666
+ app .SetStoreLoader (upgradetypes .UpgradeStoreLoader (upgradeInfo .Height , & storeUpgrades ))
667
+ }
654
668
655
669
// initialize stores
656
670
app .MountKVStores (keys )
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ import (
13
13
// for both the current (n) and the previous (n-1) upgrade name. There is a bug
14
14
// in a missing value in a log statement for which the fix is not released
15
15
var upgradesList = []string {
16
+ // 1.0.2beta
17
+ "1.0.2beta" ,
16
18
// 1.0.3beta
17
19
"1.0.3beta" ,
18
20
// 1.0.4beta
You can’t perform that action at this time.
0 commit comments