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