From 5365802e86e539e28387f92ec948605f0b285d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Negovanovi=C4=87?= <93934272+Stefan-Ethernal@users.noreply.github.com> Date: Mon, 20 Mar 2023 10:22:06 +0100 Subject: [PATCH] Reuse chain id from manifest when creating genesis configuration (#1302) --- command/genesis/genesis.go | 2 +- command/genesis/polybft_params.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/command/genesis/genesis.go b/command/genesis/genesis.go index ca84424cb7..35dbc92a6c 100644 --- a/command/genesis/genesis.go +++ b/command/genesis/genesis.go @@ -209,7 +209,7 @@ func setLegacyFlags(cmd *cobra.Command) { ¶ms.chainID, chainIDFlagLEGACY, command.DefaultChainID, - "the ID of the chain", + "the ID of the chain (not-applicable for Polybft consensus protocol as chain id is defined in manifest.json)", ) _ = cmd.Flags().MarkHidden(chainIDFlagLEGACY) diff --git a/command/genesis/polybft_params.go b/command/genesis/polybft_params.go index 6c57e86ae9..152952f70a 100644 --- a/command/genesis/polybft_params.go +++ b/command/genesis/polybft_params.go @@ -87,7 +87,7 @@ func (p *genesisParams) generatePolyBftChainConfig() error { chainConfig := &chain.Chain{ Name: p.name, Params: &chain.Params{ - ChainID: int64(p.chainID), + ChainID: manifest.ChainID, Forks: chain.AllForksEnabled, Engine: map[string]interface{}{ string(server.PolyBFTConsensus): polyBftConfig,