Closed Sexual closed 5 years ago
No, no plans on that. It's very unclear what the caller would expect. Transactions are internally shuffled between pending and queued quite a lot, and at any time a couple of hundred transactions may be moved from one to the other. and then back again a few seconds later.
Or is the caller interested in the transactions from the next pending block? Those are re-evaluated about every three seconds, and not really nice either.
So, no. Do you have a usecase that you want support for? If so, please elaborate.
@holiman To simplify our use case, we want to detect when an address receives a transaction/payment before it has confirmed.
Currently, our JS implementation uses web3.eth.filter('pending')
, but the new version utilizes Go. We've tried a "hacky" implementation using the below function, and whilst it seemed to work on the Ropsten network, on the main net it would be really delayed.
func (ec *Client) SubscribePendingTransactions(ctx context.Context, ch chan<- string) (ethereum.Subscription, error) {
return ec.c.EthSubscribe(ctx, ch, "newPendingTransactions")
}
There are a few interesting corner cases here that we'd need to consider:
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have more relevant information or answers to our questions so that we can investigate further.
There is a comment with a "todo" for this. Any plans on implementing it?