RPC: parity_allTransactionHashes (#9745)
* rpc: add parity_allTransactionHashes * Add light_all_transactionst to helpers * Remove extra parentheses * Move light_all_transactions to light_fetch * Remove LightDispatcher import in light_fetch
This commit is contained in:
committed by
Niklas Adolfsson
parent
6643b6a306
commit
f8f8bf0fea
@@ -315,6 +315,12 @@ impl TransactionQueue {
|
||||
self.pool.read().unordered_pending(ready).collect()
|
||||
}
|
||||
|
||||
/// Returns all transaction hashes in the queue without explicit ordering.
|
||||
pub fn all_transaction_hashes(&self) -> Vec<H256> {
|
||||
let ready = |_tx: &pool::VerifiedTransaction| txpool::Readiness::Ready;
|
||||
self.pool.read().unordered_pending(ready).map(|tx| tx.hash).collect()
|
||||
}
|
||||
|
||||
/// Computes unordered set of pending hashes.
|
||||
///
|
||||
/// Since strict nonce-checking is not required, you may get some false positive future transactions as well.
|
||||
|
||||
Reference in New Issue
Block a user