dropPeer is an emulator for the peer removal, simply accumulating the various peers dropped by the fetcher.
(peer string)
| 138 | // dropPeer is an emulator for the peer removal, simply accumulating the various |
| 139 | // peers dropped by the fetcher. |
| 140 | func (f *fetcherTester) dropPeer(peer string) { |
| 141 | f.lock.Lock() |
| 142 | defer f.lock.Unlock() |
| 143 | |
| 144 | f.drops[peer] = true |
| 145 | } |
| 146 | |
| 147 | // makeHeaderFetcher retrieves a block header fetcher associated with a simulated peer. |
| 148 | func (f *fetcherTester) makeHeaderFetcher(peer string, blocks map[common.Hash]*types.Block, drift time.Duration) headerRequesterFn { |
no test coverage detected