MCPcopy Create free account
hub / github.com/DNAProject/DNA / makeFastForward

Method makeFastForward

consensus/vbft/service.go:2277–2292  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2275}
2276
2277func (self *Server) makeFastForward() error {
2278 if len(self.bftActionC)+3 >= cap(self.bftActionC) {
2279 // FIXME:
2280 // some cases, such as burst of heartbeat msg, may do too much fast forward.
2281 // make bftActionC full, and bftActionLoop halted.
2282 // TODO: add throttling in state-mgmt
2283 return fmt.Errorf("server %d make fastforward skipped, %d vs %d",
2284 self.Index, len(self.bftActionC), cap(self.bftActionC))
2285 }
2286
2287 self.bftActionC <- &BftAction{
2288 Type: FastForward,
2289 BlockNum: self.GetCurrentBlockNo(),
2290 }
2291 return nil
2292}
2293
2294func (self *Server) reBroadcastCurrentRoundMsgs() error {
2295 if len(self.bftActionC)+3 >= cap(self.bftActionC) {

Callers 4

sealProposalMethod · 0.95
onPeerUpdateMethod · 0.80
onLiveTickMethod · 0.80
setSyncedReadyMethod · 0.80

Calls 2

GetCurrentBlockNoMethod · 0.95
ErrorfMethod · 0.80

Tested by

no test coverage detected