mirror of https://github.com/poanetwork/gecko.git
Started gossiping thread
This commit is contained in:
parent
4a989dc621
commit
13fbe14d44
|
@ -78,7 +78,7 @@ func (t *Transitive) Gossip() {
|
|||
return
|
||||
}
|
||||
|
||||
t.Config.Context.Log.Info("Gossiping %s as accepted to the network", vtxID)
|
||||
t.Config.Context.Log.Debug("Gossiping %s as accepted to the network", vtxID)
|
||||
t.Config.Sender.Gossip(vtxID, vtx.Bytes())
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ func (t *Transitive) Gossip() {
|
|||
return
|
||||
}
|
||||
|
||||
t.Config.Context.Log.Info("Gossiping %s as accepted to the network", blkID)
|
||||
t.Config.Context.Log.Debug("Gossiping %s as accepted to the network", blkID)
|
||||
t.Config.Sender.Gossip(blkID, blk.Bytes())
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@ func (sr *ChainRouter) Initialize(log logging.Logger, timeouts *timeout.Manager,
|
|||
sr.chains = make(map[[32]byte]*handler.Handler)
|
||||
sr.timeouts = timeouts
|
||||
sr.gossiper = timer.NewRepeater(sr.Gossip, gossipFrequency)
|
||||
|
||||
go log.RecoverAndPanic(sr.gossiper.Dispatch)
|
||||
}
|
||||
|
||||
// AddChain registers the specified chain so that incoming
|
||||
|
@ -259,6 +261,7 @@ func (sr *ChainRouter) shutdown() {
|
|||
for _, chain := range sr.chains {
|
||||
chain.Shutdown()
|
||||
}
|
||||
sr.gossiper.Stop()
|
||||
}
|
||||
|
||||
// Gossip accepted containers
|
||||
|
|
Loading…
Reference in New Issue