services/consensus: add some logging on start

This commit is contained in:
Roman Khimov 2021-04-02 13:13:26 +03:00
parent 99b71bbbd1
commit 84b240cc9a
4 changed files with 4 additions and 0 deletions

View file

@ -244,6 +244,7 @@ func (s *service) newPrepareRequest() payload.PrepareRequest {
func (s *service) Start() {
if s.started.CAS(false, true) {
s.log.Info("starting consensus service")
s.dbft.Start()
s.Chain.SubscribeForBlocks(s.blockEvents)
go s.eventLoop()

View file

@ -117,6 +117,7 @@ func NewNotary(cfg Config, net netmode.Magic, mp *mempool.Pool, onTransaction fu
// Run runs Notary module and should be called in a separate goroutine.
func (n *Notary) Run() {
n.Config.Log.Info("starting notary service")
n.Config.Chain.SubscribeForBlocks(n.blocksCh)
n.mp.SubscribeForTransactions(n.reqCh)
for {

View file

@ -162,6 +162,7 @@ func (o *Oracle) Shutdown() {
// Run runs must be executed in a separate goroutine.
func (o *Oracle) Run() {
o.Log.Info("starting oracle service")
for i := 0; i < o.MainCfg.MaxConcurrentRequests; i++ {
go o.runRequestWorker()
}

View file

@ -12,6 +12,7 @@ import (
// Run runs service instance in a separate goroutine.
func (s *service) Run() {
s.log.Info("starting state validation service")
s.chain.SubscribeForBlocks(s.blockCh)
go s.run()
}