Skip to content

Commit

Permalink
chore: update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherbrumm committed Jan 30, 2025
1 parent bf5914c commit 4758266
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/upgrades/v2_0/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func CreateUpgradeHandler(
// Run KYVE migrations
migrateProtocolStakers(sdkCtx, delegationKeeper, stakersKeeper, stakingKeeper, bankKeeper)

// Run KYVE migrations
// Run Bundles Merkle Roots migrations
bundlesKeeper.SetBundlesMigrationUpgradeHeight(sdkCtx, uint64(sdkCtx.BlockHeight()))

logger.Info(fmt.Sprintf("finished upgrade %v", UpgradeName))
Expand Down
5 changes: 2 additions & 3 deletions x/bundles/migration/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func init() {
}
}

// MigrateBundlesModule migrates the bundles by adding the missing Merkle Roots to the bundle summary.
func MigrateBundlesModule(sdkCtx sdk.Context, bundlesKeeper bundleskeeper.Keeper, upgradeHeight int64) {
logger = sdkCtx.Logger().With("upgrade", "bundles-migration")

Expand All @@ -79,14 +80,12 @@ func MigrateBundlesModule(sdkCtx sdk.Context, bundlesKeeper bundleskeeper.Keeper
}

if err := migrateFinalizedBundles(sdkCtx, bundlesKeeper, offset, bundlesMigrationEntry); err != nil {
// TODO: Error handling
panic(err)
}
}
}

// MigrateFinalizedBundles ...
// maxBundleId -> inclusive
// migrateFinalizedBundles sets the updated bundles for a certain range.
func migrateFinalizedBundles(ctx sdk.Context, bundlesKeeper bundleskeeper.Keeper, offset uint64, bundlesMigrationEntry BundlesMigrationEntry) error {
// Init Bundles Store
storeAdapter := runtime.KVStoreAdapter(bundlesKeeper.Migration_GetStoreService().OpenKVStore(ctx))
Expand Down

0 comments on commit 4758266

Please sign in to comment.