mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
cmd/utils: handle err which returned from eth.New to fix panic
This commit is contained in:
parent
adcaf55ce6
commit
8b7eebf0cb
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