mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 12:07:17 +00:00
save
This commit is contained in:
commit
e33561e960
@ -835,6 +835,7 @@ func (s *Ethereum) Init(stack *node.Node, config *ethconfig.Config) error {
|
||||
return
|
||||
}
|
||||
}()
|
||||
|
||||
go s.engineBackendRPC.Start(httpRpcCfg, s.chainDB, s.blockReader, ff, stateCache, s.agg, s.engine, ethRpcClient, txPoolRpcClient, miningRpcClient)
|
||||
|
||||
// Register the backend on the node
|
||||
@ -1182,8 +1183,8 @@ func (s *Ethereum) Start() error {
|
||||
}
|
||||
return currentTD
|
||||
}
|
||||
|
||||
if params.IsChainPoS(s.chainConfig, currentTDProvider) {
|
||||
s.waitForStageLoopStop = nil // TODO: Ethereum.Stop should wait for execution_server shutdown
|
||||
go s.eth1ExecutionServer.Start(s.sentryCtx)
|
||||
} else {
|
||||
go stages2.StageLoop(s.sentryCtx, s.chainDB, s.stagedSync, s.sentriesClient.Hd, s.waitForStageLoopStop, s.config.Sync.LoopThrottle, s.logger, s.blockReader, hook, s.config.ForcePartialCommit)
|
||||
@ -1216,9 +1217,10 @@ func (s *Ethereum) Stop() error {
|
||||
}
|
||||
}
|
||||
libcommon.SafeClose(s.sentriesClient.Hd.QuitPoWMining)
|
||||
|
||||
_ = s.engine.Close()
|
||||
<-s.waitForStageLoopStop
|
||||
if s.waitForStageLoopStop != nil {
|
||||
<-s.waitForStageLoopStop
|
||||
}
|
||||
if s.config.Miner.Enabled {
|
||||
<-s.waitForMiningStop
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user