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

Method forgetBlock

protocols/cpc/fetcher/fetcher.go:737–745  ·  view source on GitHub ↗

forgetBlock removes all traces of a queued block from the fetcher's internal state.

(hash common.Hash)

Source from the content-addressed store, hash-verified

735// forgetBlock removes all traces of a queued block from the fetcher's internal
736// state.
737func (f *Fetcher) forgetBlock(hash common.Hash) {
738 if insert := f.queued[hash]; insert != nil {
739 f.queues[insert.origin]--
740 if f.queues[insert.origin] == 0 {
741 delete(f.queues, insert.origin)
742 }
743 delete(f.queued, hash)
744 }
745}

Callers 1

loopMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected