From c874441aba61b650099dd63c1368bf2c236044cd Mon Sep 17 00:00:00 2001 From: moul <94029+moul@users.noreply.github.com> Date: Thu, 14 Nov 2024 21:11:01 +0100 Subject: [PATCH] chore: fixup Signed-off-by: moul <94029+moul@users.noreply.github.com> --- contribs/gnodev/pkg/dev/node.go | 7 ++++++- gno.land/genesis/genesis_params.toml | 2 +- gno.land/pkg/gnoland/node_inmemory.go | 1 + gno.land/pkg/integration/testing_node.go | 1 - 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/contribs/gnodev/pkg/dev/node.go b/contribs/gnodev/pkg/dev/node.go index 2204d0432fe..3fc30003c2a 100644 --- a/contribs/gnodev/pkg/dev/node.go +++ b/contribs/gnodev/pkg/dev/node.go @@ -562,6 +562,12 @@ func newNodeConfig(tmc *tmcfg.Config, chainid, chaindomain string, appstate gnol // 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.AppState = appstate // Add self as validator @@ -581,6 +587,5 @@ func newNodeConfig(tmc *tmcfg.Config, chainid, chaindomain string, appstate gnol Genesis: genesis, VMOutput: os.Stdout, } - cfg.InitChainerConfig.ChainDomain = chaindomain return cfg } diff --git a/gno.land/genesis/genesis_params.toml b/gno.land/genesis/genesis_params.toml index 5f4d9c5015c..fb080024624 100644 --- a/gno.land/genesis/genesis_params.toml +++ b/gno.land/genesis/genesis_params.toml @@ -8,7 +8,7 @@ ## gnovm ["gno.land/r/sys/params.vm"] - # TODO: chain_domain.string = "gno.land" + chain_domain.string = "gno.land" # TODO: max_gas.int64 = 100_000_000 # TODO: chain_tz.string = "UTC" # TODO: default_storage_allowance.string = "" diff --git a/gno.land/pkg/gnoland/node_inmemory.go b/gno.land/pkg/gnoland/node_inmemory.go index 426a8c780c7..4b6f70bf150 100644 --- a/gno.land/pkg/gnoland/node_inmemory.go +++ b/gno.land/pkg/gnoland/node_inmemory.go @@ -46,6 +46,7 @@ func NewDefaultGenesisConfig(chainid string) *bft.GenesisDoc { AppState: &GnoGenesisState{ Balances: []Balance{}, Txs: []TxWithMetadata{}, + Params: []Param{}, }, } } diff --git a/gno.land/pkg/integration/testing_node.go b/gno.land/pkg/integration/testing_node.go index 61bea86bcf7..7e34049d352 100644 --- a/gno.land/pkg/integration/testing_node.go +++ b/gno.land/pkg/integration/testing_node.go @@ -92,7 +92,6 @@ func TestingMinimalNodeConfig(t TestingTS, gnoroot string) *gnoland.InMemoryNode InitChainerConfig: gnoland.InitChainerConfig{ GenesisTxResultHandler: gnoland.PanicOnFailingTxResultHandler, CacheStdlibLoad: true, - ChainDomain: "gno.land", }, } }