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

feat: introduce tx stream #303

Merged
merged 10 commits into from
Jun 5, 2021
Merged

feat: introduce tx stream #303

merged 10 commits into from
Jun 5, 2021

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented May 30, 2021

Motivation

Provides support to fetch the respective transactions for all transaction hashes provided by a Stream<Item=TxHash>.

Solution

Create a new TransactionStream type that takes a Provider and a Stream<Item=TxHash> as input as well as the number of the maximum allowed active futures at the same time and returns their Transaction.

Added a transactions_unordered function for the Filterwatcher<TxHash> and SubscriptionStream<TxHash> types that is intended to be called like:

 provider.watch_pending_transactions().await.unwrap().transactions_unordered(10);

and

 provider.subscribe_pending_txs().await.unwrap().transactions_unordered(10);

@mattsse mattsse marked this pull request as ready for review June 3, 2021 21:28
@gakonst gakonst merged commit 57163a4 into gakonst:master Jun 5, 2021
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.

2 participants