mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
beacon/blsync: fix lifecycle methods signature
This commit is contained in:
parent
dfd8dcee68
commit
90151aef67
1 changed files with 4 additions and 2 deletions
|
|
@ -93,7 +93,7 @@ func (c *Client) SetEngineRPC(engine *rpc.Client) {
|
||||||
c.engineRPC = engine
|
c.engineRPC = engine
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) Start() {
|
func (c *Client) Start() error {
|
||||||
headCh := make(chan types.ChainHeadEvent, 16)
|
headCh := make(chan types.ChainHeadEvent, 16)
|
||||||
c.blockSync.SubscribeChainHead(headCh)
|
c.blockSync.SubscribeChainHead(headCh)
|
||||||
c.engineClient = startEngineClient(c.chainConfig, c.engineRPC, headCh)
|
c.engineClient = startEngineClient(c.chainConfig, c.engineRPC, headCh)
|
||||||
|
|
@ -103,10 +103,12 @@ func (c *Client) Start() {
|
||||||
beaconApi := api.NewBeaconLightApi(url, c.customHeader)
|
beaconApi := api.NewBeaconLightApi(url, c.customHeader)
|
||||||
c.scheduler.RegisterServer(request.NewServer(api.NewApiServer(beaconApi), &mclock.System{}))
|
c.scheduler.RegisterServer(request.NewServer(api.NewApiServer(beaconApi), &mclock.System{}))
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) Stop() {
|
func (c *Client) Stop() error {
|
||||||
c.engineClient.stop()
|
c.engineClient.stop()
|
||||||
c.chainHeadSub.Unsubscribe()
|
c.chainHeadSub.Unsubscribe()
|
||||||
c.scheduler.Stop()
|
c.scheduler.Stop()
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue