Added pending transaction info to eth_getTransactionByHash (#4570)

* Return condition info for pending transactions

* Fixed warnings
This commit is contained in:
Arkadiy Paronyan
2017-02-20 16:19:43 +01:00
committed by Gav Wood
parent b9665c7cfe
commit 0aad8a87ae
6 changed files with 8 additions and 10 deletions

View File

@@ -1137,8 +1137,8 @@ impl TransactionQueue {
}
/// Finds transaction in the queue by hash (if any)
pub fn find(&self, hash: &H256) -> Option<SignedTransaction> {
self.by_hash.get(hash).map(|tx| tx.transaction.clone())
pub fn find(&self, hash: &H256) -> Option<PendingTransaction> {
self.by_hash.get(hash).map(|tx| PendingTransaction { transaction: tx.transaction.clone(), condition: tx.condition.clone() })
}
/// Removes all elements (in any state) from the queue