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

Method EthSubscribe

api/rpc/client.go:394–396  ·  view source on GitHub ↗

EthSubscribe registers a subscripion under the "eth" namespace.

(ctx context.Context, channel interface{}, args ...interface{})

Source from the content-addressed store, hash-verified

392
393// EthSubscribe registers a subscripion under the "eth" namespace.
394func (c *Client) EthSubscribe(ctx context.Context, channel interface{}, args ...interface{}) (*ClientSubscription, error) {
395 return c.Subscribe(ctx, "eth", channel, args...)
396}
397
398// ShhSubscribe registers a subscripion under the "shh" namespace.
399func (c *Client) ShhSubscribe(ctx context.Context, channel interface{}, args ...interface{}) (*ClientSubscription, error) {

Callers 7

SubscribeNewHeadMethod · 0.80
SubscribeFilterLogsMethod · 0.80
subscribeBlocksFunction · 0.80
TestClientSubscribeFunction · 0.80
TestClientSubscribeCloseFunction · 0.80

Calls 1

SubscribeMethod · 0.95

Tested by 5

subscribeBlocksFunction · 0.64
TestClientSubscribeFunction · 0.64
TestClientSubscribeCloseFunction · 0.64