Skip to content

Commit

Permalink
chore: fixup
Browse files Browse the repository at this point in the history
Signed-off-by: moul <[email protected]>
  • Loading branch information
moul committed Nov 14, 2024
1 parent c874441 commit f6e3a5d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 1 addition & 7 deletions contribs/gnodev/pkg/dev/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -561,13 +561,7 @@ func (n *Node) genesisTxResultHandler(ctx sdk.Context, tx std.Tx, res sdk.Result
func newNodeConfig(tmc *tmcfg.Config, chainid, chaindomain string, appstate gnoland.GnoGenesisState) *gnoland.InMemoryNodeConfig {
// Create Mocked Identity
pv := gnoland.NewMockedPrivValidator()
genesis := gnoland.NewDefaultGenesisConfig(chainid)

// custom chain domain
var domainParam gnoland.Param
_ = domainParam.Parse("gno.land/r/sys/params.vm.chain_domain.string=" + chaindomain)
appstate.Params = append(appstate.Params, domainParam)

genesis := gnoland.NewDefaultGenesisConfig(chainid, chaindomain)
genesis.AppState = appstate

// Add self as validator
Expand Down
10 changes: 8 additions & 2 deletions gno.land/pkg/gnoland/node_inmemory.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ func NewMockedPrivValidator() bft.PrivValidator {
}

// NewDefaultGenesisConfig creates a default configuration for an in-memory node.
func NewDefaultGenesisConfig(chainid string) *bft.GenesisDoc {
func NewDefaultGenesisConfig(chainid, chaindomain string) *bft.GenesisDoc {
// custom chain domain
var domainParam Param
_ = domainParam.Parse("gno.land/r/sys/params.vm.chain_domain.string=" + chaindomain)

return &bft.GenesisDoc{
GenesisTime: time.Now(),
ChainID: chainid,
Expand All @@ -46,7 +50,9 @@ func NewDefaultGenesisConfig(chainid string) *bft.GenesisDoc {
AppState: &GnoGenesisState{
Balances: []Balance{},
Txs: []TxWithMetadata{},
Params: []Param{},
Params: []Param{
domainParam,
},
},
}
}
Expand Down

0 comments on commit f6e3a5d

Please sign in to comment.