| 199 | } |
| 200 | |
| 201 | func (pm *ProtocolManager) handleBlockchainInsertionEventsLoop() { |
| 202 | for ev := range pm.insertionSub.Chan() { |
| 203 | switch ev.Data.(type) { |
| 204 | // for now, skip this! |
| 205 | case core.InsertionStartEvent: |
| 206 | // atomic.StoreUint32(&pm.acceptTxs, 0) |
| 207 | // log.Debug("received InsertionStartEvent, do not accept txs now") |
| 208 | |
| 209 | case core.InsertionDoneEvent: |
| 210 | // atomic.StoreUint32(&pm.acceptTxs, 1) |
| 211 | // log.Debug("received InsertionDoneEvent, now ready to accept txs") |
| 212 | } |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | // Stop stops all |
| 217 | func (pm *ProtocolManager) Stop() { |