Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

add subscribe_full_pending_txs() #2424

Merged
merged 2 commits into from
May 23, 2023
Merged

add subscribe_full_pending_txs() #2424

merged 2 commits into from
May 23, 2023

Conversation

0xlosh
Copy link
Contributor

@0xlosh 0xlosh commented May 18, 2023

Motivation

geth recently added SubscribeFullPendingTransactions

this PR just adds a new method called subscribe_full_pending_txs(), which instead of streaming hashes, streams
whole tx bodies. the only edit was adding true as a additional parameter, so subscribe([utils::serialize(&"newPendingTransactions"), utils::serialize(&true)]).

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dennohpeter
Copy link
Contributor

LGTM too; waiting for the merge

@mattsse
Copy link
Collaborator

mattsse commented May 23, 2023

fyi @DaniPopes

Comment on lines 923 to 929
/// 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(
Copy link
Collaborator

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?

Copy link
Collaborator

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.

Copy link
Contributor Author

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 :)

Copy link
Collaborator

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@DaniPopes DaniPopes merged commit 573847c into gakonst:master May 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants