Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Add future transactions pool accessor to ValidatedPool (#8673)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgmichel committed May 1, 2021
1 parent 70ef0af commit dab7d56
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/transaction-pool/graph/src/validated_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,13 @@ impl<B: ChainApi> ValidatedPool<B> {
self.pool.read().ready()
}

/// Returns a Vec of hashes and extrinsics in the future pool.
pub fn futures(&self) -> Vec<(ExtrinsicHash<B>, ExtrinsicFor<B>)> {
self.pool.read().futures()
.map(|tx| (tx.hash.clone(), tx.data.clone()))
.collect()
}

/// Returns pool status.
pub fn status(&self) -> PoolStatus {
self.pool.read().status()
Expand Down

0 comments on commit dab7d56

Please sign in to comment.