(most of) parity RPC for light client

This commit is contained in:
Robert Habermeier
2017-02-17 21:38:43 +01:00
parent 3b023c82b7
commit 9316eb4ad3
11 changed files with 587 additions and 89 deletions

View File

@@ -110,6 +110,14 @@ impl RequestSet {
pub fn collect_ids<F>(&self) -> F where F: FromIterator<ReqId> {
self.ids.keys().cloned().collect()
}
/// Number of requests in the set.
pub fn len(&self) -> usize {
self.ids.len()
}
/// Whether the set is empty.
pub fn is_empty(&self) -> bool { self.len() == 0 }
}
#[cfg(test)]