mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-01 18:57:37 +00:00
les: copy constans after get networkID
This commit is contained in:
parent
98cff5d6c2
commit
5f750498f4
1 changed files with 6 additions and 4 deletions
|
|
@ -92,6 +92,12 @@ func New(ctx *node.ServiceContext, config *ethconfig.Config) (*LightEthereum, er
|
|||
return nil, genesisErr
|
||||
}
|
||||
|
||||
networkID := config.NetworkId
|
||||
if networkID == 0 {
|
||||
networkID = chainConfig.ChainId.Uint64()
|
||||
}
|
||||
common.CopyConstans(networkID)
|
||||
|
||||
log.Info(strings.Repeat("-", 153))
|
||||
for _, line := range strings.Split(chainConfig.Description(), "\n") {
|
||||
log.Info(line)
|
||||
|
|
@ -101,10 +107,6 @@ func New(ctx *node.ServiceContext, config *ethconfig.Config) (*LightEthereum, er
|
|||
peers := newPeerSet()
|
||||
quitSync := make(chan struct{})
|
||||
|
||||
networkID := config.NetworkId
|
||||
if networkID == 0 {
|
||||
networkID = chainConfig.ChainId.Uint64()
|
||||
}
|
||||
leth := &LightEthereum{
|
||||
config: config,
|
||||
chainConfig: chainConfig,
|
||||
|
|
|
|||
Loading…
Reference in a new issue