Skip to content

newPendingTransactions support in ethclient.go #22916

@huahuayu

Description

@huahuayu

hi, for eth_subscribe method, I wonder why the client only supports newHeads

func (ec *Client) SubscribeNewHead(ctx context.Context, ch chan<- *types.Header) (ethereum.Subscription, error) {

but don't supportnewPendingTransactions in ethclient.go

they are all be mentioned in the same place in the document: https://geth.ethereum.org/docs/rpc/pubsub

but if I want to subscribe newPendingTransactions I have to use underlaying rpc client. Since it's not exported, so I have to instantiation a *rpc.Client besides an *ethclient.Client

type Client struct {	c *rpc.Client}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions