Enqueue tries to fill gaps the the fetcher's future import queue.
(peer string, block *types.Block)
| 205 | |
| 206 | // Enqueue tries to fill gaps the the fetcher's future import queue. |
| 207 | func (f *Fetcher) Enqueue(peer string, block *types.Block) error { |
| 208 | op := &inject{ |
| 209 | origin: peer, |
| 210 | block: block, |
| 211 | } |
| 212 | select { |
| 213 | case f.inject <- op: |
| 214 | return nil |
| 215 | case <-f.quit: |
| 216 | return errTerminated |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | // FilterHeaders extracts all the headers that were explicitly requested by the fetcher, |
| 221 | // returning those that should be handled differently. |
no outgoing calls