()
| 2275 | } |
| 2276 | |
| 2277 | func (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 | |
| 2294 | func (self *Server) reBroadcastCurrentRoundMsgs() error { |
| 2295 | if len(self.bftActionC)+3 >= cap(self.bftActionC) { |
no test coverage detected