-
Notifications
You must be signed in to change notification settings - Fork 766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add subscribe_full_pending_txs() #2424
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
LGTM too; waiting for the merge |
fyi @DaniPopes |
ethers-providers/src/middleware.rs
Outdated
/// Subscribe to a stream of pending transaction bodies. | ||
/// | ||
/// This function is only available on pubsub clients, such as Websockets | ||
/// or IPC. For a polling alternative available over HTTP, use | ||
/// [`Middleware::watch_pending_transactions`]. However, be aware that | ||
/// polling increases RPC usage drastically. | ||
async fn subscribe_full_pending_txs( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you document that this API will only work on Geth >=X.Y.Z
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is also not available on all providers or is specific to tiers.
so essentially the same as all the tracing APIs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you document that this API will only work on Geth
>=X.Y.Z
?
added :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Motivation
geth recently added SubscribeFullPendingTransactions
this PR just adds a new method called
subscribe_full_pending_txs()
, which instead of streaming hashes, streamswhole tx bodies. the only edit was adding
true
as a additional parameter, sosubscribe([utils::serialize(&"newPendingTransactions"), utils::serialize(&true)])
.PR Checklist