Skip to content

Commit

Permalink
change name of StreamGenesis to ExportGenesisStream
Browse files Browse the repository at this point in the history
  • Loading branch information
jewei1997 committed Jul 21, 2024
1 parent 8567729 commit dbb7436
Show file tree
Hide file tree
Showing 19 changed files with 22 additions and 21 deletions.
4 changes: 2 additions & 2 deletions tests/mocks/types_module_module.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions types/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ type AppModuleGenesis interface {

InitGenesis(sdk.Context, codec.JSONCodec, json.RawMessage) []abci.ValidatorUpdate
ExportGenesis(sdk.Context, codec.JSONCodec) json.RawMessage
StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage
ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage
}

// AppModule is the standard form for an application module
Expand Down Expand Up @@ -456,7 +456,7 @@ func (m *Manager) ProcessGenesisPerModule(ctx sdk.Context, cdc codec.JSONCodec,
// doesn't matter much but the order of importing does due to invariant checks and how we are streaming the genesis
// file here
for _, moduleName := range m.OrderInitGenesis {
ch := m.Modules[moduleName].StreamGenesis(ctx, cdc)
ch := m.Modules[moduleName].ExportGenesisStream(ctx, cdc)
for msg := range ch {
err := process(moduleName, msg)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion x/accesscontrol/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
return cdc.MustMarshalJSON(genState)
}

func (am AppModule) StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
ch := make(chan json.RawMessage)
go func() {
ch <- am.ExportGenesis(ctx, cdc)
Expand Down
2 changes: 1 addition & 1 deletion x/auth/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
return cdc.MustMarshalJSON(gs)
}

func (am AppModule) StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
ch := make(chan json.RawMessage)
go func() {
ch <- am.ExportGenesis(ctx, cdc)
Expand Down
3 changes: 2 additions & 1 deletion x/auth/vesting/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func (am AppModuleBasic) ValidateGenesisStream(cdc codec.JSONCodec, config clien
}
return nil
}

// RegisterRESTRoutes registers module's REST handlers. Currently, this is a no-op.
func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) {}

Expand Down Expand Up @@ -129,7 +130,7 @@ func (am AppModule) ExportGenesis(_ sdk.Context, cdc codec.JSONCodec) json.RawMe
return am.DefaultGenesis(cdc)
}

func (am AppModule) StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
ch := make(chan json.RawMessage)
go func() {
ch <- am.ExportGenesis(ctx, cdc)
Expand Down
2 changes: 1 addition & 1 deletion x/authz/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
return cdc.MustMarshalJSON(gs)
}

func (am AppModule) StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
ch := make(chan json.RawMessage)
go func() {
ch <- am.ExportGenesis(ctx, cdc)
Expand Down
2 changes: 1 addition & 1 deletion x/bank/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
return cdc.MustMarshalJSON(gs)
}

func (am AppModule) StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
ch := make(chan json.RawMessage)
go func() {
ch <- am.ExportGenesis(ctx, cdc)
Expand Down
2 changes: 1 addition & 1 deletion x/capability/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
return cdc.MustMarshalJSON(genState)
}

func (am AppModule) StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
ch := make(chan json.RawMessage)
go func() {
ch <- am.ExportGenesis(ctx, cdc)
Expand Down
2 changes: 1 addition & 1 deletion x/crisis/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
return cdc.MustMarshalJSON(gs)
}

func (am AppModule) StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
ch := make(chan json.RawMessage)
go func() {
ch <- am.ExportGenesis(ctx, cdc)
Expand Down
2 changes: 1 addition & 1 deletion x/distribution/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
return cdc.MustMarshalJSON(gs)
}

func (am AppModule) StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
ch := make(chan json.RawMessage)
go func() {
ch <- am.ExportGenesis(ctx, cdc)
Expand Down
2 changes: 1 addition & 1 deletion x/evidence/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
return cdc.MustMarshalJSON(ExportGenesis(ctx, am.keeper))
}

func (am AppModule) StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
ch := make(chan json.RawMessage)
go func() {
ch <- am.ExportGenesis(ctx, cdc)
Expand Down
2 changes: 1 addition & 1 deletion x/feegrant/module/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
return cdc.MustMarshalJSON(gs)
}

func (am AppModule) StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
ch := make(chan json.RawMessage)
go func() {
ch <- am.ExportGenesis(ctx, cdc)
Expand Down
2 changes: 1 addition & 1 deletion x/genutil/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (am AppModule) ExportGenesis(_ sdk.Context, cdc codec.JSONCodec) json.RawMe
return am.DefaultGenesis(cdc)
}

func (am AppModule) StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
ch := make(chan json.RawMessage)
go func() {
ch <- am.ExportGenesis(ctx, cdc)
Expand Down
2 changes: 1 addition & 1 deletion x/gov/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
return cdc.MustMarshalJSON(gs)
}

func (am AppModule) StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
ch := make(chan json.RawMessage)
go func() {
ch <- am.ExportGenesis(ctx, cdc)
Expand Down
2 changes: 1 addition & 1 deletion x/mint/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
return cdc.MustMarshalJSON(gs)
}

func (am AppModule) StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
ch := make(chan json.RawMessage)
go func() {
ch <- am.ExportGenesis(ctx, cdc)
Expand Down
2 changes: 1 addition & 1 deletion x/params/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
return cdc.MustMarshalJSON(gs)
}

func (am AppModule) StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
ch := make(chan json.RawMessage)
go func() {
ch <- am.ExportGenesis(ctx, cdc)
Expand Down
2 changes: 1 addition & 1 deletion x/slashing/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
return cdc.MustMarshalJSON(gs)
}

func (am AppModule) StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
ch := make(chan json.RawMessage)
go func() {
ch <- am.ExportGenesis(ctx, cdc)
Expand Down
2 changes: 1 addition & 1 deletion x/staking/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw
return cdc.MustMarshalJSON(gs)
}

func (am AppModule) StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
ch := make(chan json.RawMessage)
go func() {
ch <- am.ExportGenesis(ctx, cdc)
Expand Down
2 changes: 1 addition & 1 deletion x/upgrade/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (am AppModule) ExportGenesis(_ sdk.Context, cdc codec.JSONCodec) json.RawMe
return am.DefaultGenesis(cdc)
}

func (am AppModule) StreamGenesis(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <-chan json.RawMessage {
ch := make(chan json.RawMessage)
go func() {
ch <- am.ExportGenesis(ctx, cdc)
Expand Down

0 comments on commit dbb7436

Please sign in to comment.