light: get local transactions by hash

This commit is contained in:
Robert Habermeier
2017-10-24 07:09:48 +02:00
parent 42e23a9633
commit 965dff3d32
2 changed files with 19 additions and 1 deletions

View File

@@ -321,6 +321,11 @@ impl TransactionQueue {
self.by_hash.remove(&hash);
}
}
/// Get a transaction by hash.
pub fn get(&self, hash: &H256) -> Option<&PendingTransaction> {
self.by_hash.get(&hash)
}
}
#[cfg(test)]