MCPcopy Create free account
hub / github.com/CPChain/chain / verifyImportDone

Function verifyImportDone

protocols/cpc/fetcher/fetcher_test.go:255–261  ·  view source on GitHub ↗

verifyImportDone verifies that no more events are arriving on an import channel.

(t *testing.T, imported chan *types.Block)

Source from the content-addressed store, hash-verified

253
254// verifyImportDone verifies that no more events are arriving on an import channel.
255func verifyImportDone(t *testing.T, imported chan *types.Block) {
256 select {
257 case <-imported:
258 t.Fatalf("extra block imported")
259 case <-time.After(50 * time.Millisecond):
260 }
261}
262
263// Tests that a fetcher accepts block announcements and initiates retrievals for
264// them, successfully importing into the local chain.

Calls

no outgoing calls

Tested by

no test coverage detected