()
| 190 | } |
| 191 | |
| 192 | func (w *PollingClient) getLatestHeader() (*types.Header, error) { |
| 193 | ctx, cancel := context.WithTimeout(w.ctx, 5*time.Second) |
| 194 | defer cancel() |
| 195 | return w.HeaderByNumber(ctx, big.NewInt(rpc.LatestBlockNumber.Int64())) |
| 196 | } |
| 197 | |
| 198 | // scheduleNextPoll decides the next poll time based on next head.Time: |
| 199 | func (w *PollingClient) scheduleNextPoll(head *types.Header) { |
nothing calls this directly
no test coverage detected