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

Method subscribePendingLogs

protocols/cpc/filters/filter_system.go:270–283  ·  view source on GitHub ↗

subscribePendingLogs creates a subscription that writes transaction hashes for transactions that enter the transaction pool.

(crit cpchain.FilterQuery, logs chan []*types.Log)

Source from the content-addressed store, hash-verified

268// subscribePendingLogs creates a subscription that writes transaction hashes for
269// transactions that enter the transaction pool.
270func (es *EventSystem) subscribePendingLogs(crit cpchain.FilterQuery, logs chan []*types.Log) *Subscription {
271 sub := &subscription{
272 id: rpc.NewID(),
273 typ: PendingLogsSubscription,
274 logsCrit: crit,
275 created: time.Now(),
276 logs: logs,
277 hashes: make(chan []common.Hash),
278 headers: make(chan *types.Header),
279 installed: make(chan struct{}),
280 err: make(chan error),
281 }
282 return es.subscribe(sub)
283}
284
285// SubscribeNewHeads creates a subscription that writes the header of a block that is
286// imported in the chain.

Callers 1

SubscribeLogsMethod · 0.95

Calls 2

subscribeMethod · 0.95
NowMethod · 0.65

Tested by

no test coverage detected