Skip to content

Commit

Permalink
Reuse chain id from manifest when creating genesis configuration (0xP…
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal authored Mar 20, 2023
1 parent bef9f0f commit 5365802
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion command/genesis/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func setLegacyFlags(cmd *cobra.Command) {
&params.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)
Expand Down
2 changes: 1 addition & 1 deletion command/genesis/polybft_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5365802

Please sign in to comment.