mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
Merge pull request #888 from gzliudan/fix_nil_eth
cmd/utils: handle err returned by eth.New to fix panic
This commit is contained in:
commit
2b04581df2
1 changed files with 3 additions and 0 deletions
|
|
@ -30,6 +30,9 @@ func RegisterEthService(stack *node.Node, cfg *ethconfig.Config, version string)
|
|||
var lendingServ *XDCxlending.Lending
|
||||
ctx.Service(&lendingServ)
|
||||
fullNode, err := eth.New(ctx, cfg, XDCXServ, lendingServ)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if fullNode != nil && cfg.LightServ > 0 {
|
||||
ls, _ := les.NewLesServer(fullNode, cfg)
|
||||
fullNode.AddLesServer(ls)
|
||||
|
|
|
|||
Loading…
Reference in a new issue