updated to rocksdb wrapper version 0.3
This commit is contained in:
parent
1ebd14bb18
commit
838eea61f9
@ -15,7 +15,7 @@ mio = "0.5.0"
|
||||
rand = "0.3.12"
|
||||
time = "0.1.34"
|
||||
tiny-keccak = "1.0"
|
||||
rocksdb = "0.2"
|
||||
rocksdb = "0.3"
|
||||
lazy_static = "0.1"
|
||||
eth-secp256k1 = { git = "https://github.com/arkpar/rust-secp256k1.git" }
|
||||
rust-crypto = "0.2.34"
|
||||
|
@ -10,7 +10,7 @@ use std::ops::*;
|
||||
use std::sync::*;
|
||||
use std::env;
|
||||
use std::collections::HashMap;
|
||||
use rocksdb::{DB, Writable};
|
||||
use rocksdb::{DB, Writable, IteratorMode};
|
||||
|
||||
#[derive(Clone)]
|
||||
/// Implementation of the HashDB trait for a disk-backed database with a memory overlay.
|
||||
@ -138,7 +138,7 @@ impl OverlayDB {
|
||||
impl HashDB for OverlayDB {
|
||||
fn keys(&self) -> HashMap<H256, i32> {
|
||||
let mut ret: HashMap<H256, i32> = HashMap::new();
|
||||
for (key, _) in self.backing.iterator().from_start() {
|
||||
for (key, _) in self.backing.iterator(IteratorMode::Start) {
|
||||
let h = H256::from_slice(key.deref());
|
||||
let r = self.payload(&h).unwrap().1;
|
||||
ret.insert(h, r as i32);
|
||||
|
Loading…
Reference in New Issue
Block a user