提交 7a6c6ec9 编写于 作者: J Jeffrey Wilcke

cmd/utils, params: define chain ids

上级 6c9c1e67
......@@ -881,6 +881,13 @@ func MakeChainConfigFromDb(ctx *cli.Context, db ethdb.Database) *params.ChainCon
config.EIP158Block = params.MainNetSpuriousDragon
}
}
if config.ChainId.BitLen() == 0 {
if ctx.GlobalBool(TestNetFlag.Name) {
config.ChainId = params.TestNetChainID
} else {
config.ChainId = params.MainNetChainID
}
}
config.DAOForkSupport = true
}
......
......@@ -37,4 +37,7 @@ var (
TestNetSpuriousDragon = big.NewInt(3000000)
MainNetSpuriousDragon = big.NewInt(3000000)
TestNetChainID = big.NewInt(2) // Test net default chain ID
MainNetChainID = big.NewInt(1) // main net default chain ID
)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册