forked from TrueCloudLab/neoneo-go
network: move service starts to tryStartServices
All of them only make sense on a fully synchronized node, doing anything during the initial sync is just a waste of time.
This commit is contained in:
parent
690a1db589
commit
99b71bbbd1
1 changed files with 10 additions and 10 deletions
|
@ -265,16 +265,6 @@ func (s *Server) Start(errChan chan error) {
|
|||
s.initStaleMemPools()
|
||||
|
||||
go s.broadcastTxLoop()
|
||||
if s.oracle != nil {
|
||||
go s.oracle.Run()
|
||||
}
|
||||
if s.notaryModule != nil {
|
||||
s.notaryRequestPool.RunSubscriptions()
|
||||
go s.notaryModule.Run()
|
||||
}
|
||||
if s.StateRootCfg.Enabled {
|
||||
s.stateRoot.Run()
|
||||
}
|
||||
go s.relayBlocksLoop()
|
||||
go s.bQueue.run()
|
||||
go s.transport.Accept()
|
||||
|
@ -449,6 +439,16 @@ func (s *Server) tryStartServices() {
|
|||
if s.Wallet != nil {
|
||||
s.consensus.Start()
|
||||
}
|
||||
if s.StateRootCfg.Enabled {
|
||||
s.stateRoot.Run()
|
||||
}
|
||||
if s.oracle != nil {
|
||||
go s.oracle.Run()
|
||||
}
|
||||
if s.notaryModule != nil {
|
||||
s.notaryRequestPool.RunSubscriptions()
|
||||
go s.notaryModule.Run()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue