Skip to content

Commit

Permalink
Rework
Browse files Browse the repository at this point in the history
  • Loading branch information
MissingNO57 committed Oct 9, 2024
1 parent 444aba9 commit cf42c79
Show file tree
Hide file tree
Showing 5 changed files with 175 additions and 136 deletions.
8 changes: 4 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ func (app *App) GetSubspace(moduleName string) paramstypes.Subspace {
return subspace
}

func getNetworkInfo(app *App, ctx *sdk.Context, manifest *UpgradeManifest, expectedChainIdOfMergeSourceGenesis string) (*NetworkConfig, error) {
func getNetworkInfo(app *App, ctx sdk.Context, manifest *UpgradeManifest, expectedChainIdOfMergeSourceGenesis string) (*NetworkConfig, error) {
// Load network config from file if given
var networkInfo *NetworkConfig
var err error
Expand Down Expand Up @@ -761,7 +761,7 @@ func getNetworkInfo(app *App, ctx *sdk.Context, manifest *UpgradeManifest, expec
return networkInfo, nil
}

func LoadAndParseMergeSourceInputFiles(app *App, ctx *sdk.Context, manifest *UpgradeManifest) (*GenesisData, *NetworkConfig, error) {
func LoadAndParseMergeSourceInputFiles(app *App, ctx sdk.Context, manifest *UpgradeManifest) (*GenesisData, *NetworkConfig, error) {

cudosJsonData, cudosGenDoc, err := LoadCudosGenesis(app, manifest)

Expand All @@ -776,7 +776,7 @@ func LoadAndParseMergeSourceInputFiles(app *App, ctx *sdk.Context, manifest *Upg

cudosConfig := NewCudosMergeConfig(networkInfo.CudosMerge)

genesisData, err := parseGenesisData(*cudosJsonData, cudosGenDoc, cudosConfig, manifest)
genesisData, err := parseGenesisData(app, ctx, *cudosJsonData, cudosGenDoc, cudosConfig, manifest)
if err != nil {
return nil, nil, fmt.Errorf("failed to parse genesis data: %w", err)
}
Expand All @@ -793,7 +793,7 @@ func (app *App) RegisterUpgradeHandlers(cfg module.Configurator) {

manifest := NewUpgradeManifest()

cudosGenesisData, networkInfo, err := LoadAndParseMergeSourceInputFiles(app, &ctx, manifest)
cudosGenesisData, networkInfo, err := LoadAndParseMergeSourceInputFiles(app, ctx, manifest)
if err != nil {
return nil, fmt.Errorf("cudos merge: %w", err)
}
Expand Down
Loading

0 comments on commit cf42c79

Please sign in to comment.