MCPcopy Create free account
hub / github.com/ethstorage/es-node / getLatestHeader

Method getLatestHeader

ethstorage/eth/polling_client.go:192–196  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

190}
191
192func (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:
199func (w *PollingClient) scheduleNextPoll(head *types.Header) {

Callers

nothing calls this directly

Calls 1

HeaderByNumberMethod · 0.65

Tested by

no test coverage detected