pass batch to process_block and process_block_header (#1594)

* use a batch consistently when processing blocks and headers

* rustfmt
This commit is contained in:
Antioch Peverell
2018-09-27 09:35:25 +01:00
committed by GitHub
parent 62fd8f2124
commit 56f84cc2f4
6 changed files with 170 additions and 135 deletions
+5
View File
@@ -191,6 +191,11 @@ impl<'a> Batch<'a> {
self.store.get(key)
}
/// Whether the provided key exists
pub fn exists(&self, key: &[u8]) -> Result<bool, Error> {
self.store.exists(key)
}
/// Produces an iterator of `Readable` types moving forward from the
/// provided key.
pub fn iter<T: ser::Readable>(&self, from: &[u8]) -> Result<SerIterator<T>, Error> {