mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 10:50:44 +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
|
return nil, genesisErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
networkID := config.NetworkId
|
||||||
|
if networkID == 0 {
|
||||||
|
networkID = chainConfig.ChainId.Uint64()
|
||||||
|
}
|
||||||
|
common.CopyConstans(networkID)
|
||||||
|
|
||||||
log.Info(strings.Repeat("-", 153))
|
log.Info(strings.Repeat("-", 153))
|
||||||
for _, line := range strings.Split(chainConfig.Description(), "\n") {
|
for _, line := range strings.Split(chainConfig.Description(), "\n") {
|
||||||
log.Info(line)
|
log.Info(line)
|
||||||
|
|
@ -101,10 +107,6 @@ func New(ctx *node.ServiceContext, config *ethconfig.Config) (*LightEthereum, er
|
||||||
peers := newPeerSet()
|
peers := newPeerSet()
|
||||||
quitSync := make(chan struct{})
|
quitSync := make(chan struct{})
|
||||||
|
|
||||||
networkID := config.NetworkId
|
|
||||||
if networkID == 0 {
|
|
||||||
networkID = chainConfig.ChainId.Uint64()
|
|
||||||
}
|
|
||||||
leth := &LightEthereum{
|
leth := &LightEthereum{
|
||||||
config: config,
|
config: config,
|
||||||
chainConfig: chainConfig,
|
chainConfig: chainConfig,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue