MCPcopy Create free account
hub / github.com/chain/Core / Init

Function Init

core/fetch/fetch.go:37–40  ·  view source on GitHub ↗

Init initializes the fetch package.

(ctx context.Context, peer *rpc.Client)

Source from the content-addressed store, hash-verified

35
36// Init initializes the fetch package.
37func Init(ctx context.Context, peer *rpc.Client) {
38 // Fetch the generator height periodically.
39 go pollGeneratorHeight(ctx, peer)
40}
41
42// Fetch runs in a loop, fetching blocks from the configured
43// peer (e.g. the generator) and applying them to the local

Callers

nothing calls this directly

Calls 1

pollGeneratorHeightFunction · 0.85

Tested by

no test coverage detected