fixed compiling util tests
This commit is contained in:
parent
7fe7b6d9a4
commit
607cc6c782
3
Cargo.lock
generated
3
Cargo.lock
generated
@ -1260,9 +1260,12 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"ethcore-bigint 0.1.3",
|
||||
"ethcore-bytes 0.1.0",
|
||||
"ethcore-logger 1.9.0",
|
||||
"hash 0.1.0",
|
||||
"hashdb 0.1.0",
|
||||
"heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kvdb 0.1.0",
|
||||
"kvdb-memorydb 0.1.0",
|
||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memorydb 0.1.0",
|
||||
"parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -6,13 +6,18 @@ description = "A `HashDB` which can manage a short-term journal potentially cont
|
||||
license = "GPL3"
|
||||
|
||||
[dependencies]
|
||||
hashdb = { path = "../hashdb" }
|
||||
kvdb = { path = "../kvdb" }
|
||||
ethcore-bigint = { path = "../bigint", features = ["heapsizeof"] }
|
||||
ethcore-bytes = { path = "../bytes" }
|
||||
rlp = { path = "../rlp" }
|
||||
hashdb = { path = "../hashdb" }
|
||||
heapsize = "0.4"
|
||||
kvdb = { path = "../kvdb" }
|
||||
log = "0.3"
|
||||
memorydb = { path = "../memorydb" }
|
||||
parking_lot = "0.4"
|
||||
heapsize = "0.4"
|
||||
rlp = { path = "../rlp" }
|
||||
util-error = { path = "../error" }
|
||||
log = "0.3"
|
||||
|
||||
[dev-dependencies]
|
||||
ethcore-logger = { path = "../../logger" }
|
||||
hash = { path = "../hash" }
|
||||
kvdb-memorydb = { path = "../kvdb-memorydb" }
|
||||
|
@ -202,8 +202,7 @@ mod tests {
|
||||
use keccak::keccak;
|
||||
use hashdb::{HashDB, DBValue};
|
||||
use super::*;
|
||||
use journaldb::traits::JournalDB;
|
||||
use kvdb_memorydb;
|
||||
use {kvdb_memorydb, JournalDB};
|
||||
|
||||
#[test]
|
||||
fn insert_same_in_fork() {
|
||||
|
@ -16,16 +16,25 @@
|
||||
|
||||
//! `JournalDB` interface and implementation.
|
||||
|
||||
extern crate heapsize;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
extern crate ethcore_bigint as bigint;
|
||||
extern crate ethcore_bytes as bytes;
|
||||
extern crate hashdb;
|
||||
extern crate kvdb;
|
||||
extern crate memorydb;
|
||||
extern crate parking_lot;
|
||||
extern crate rlp;
|
||||
extern crate hashdb;
|
||||
extern crate memorydb;
|
||||
extern crate kvdb;
|
||||
extern crate util_error as error;
|
||||
extern crate heapsize;
|
||||
#[macro_use] extern crate log;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate ethcore_logger;
|
||||
#[cfg(test)]
|
||||
extern crate hash as keccak;
|
||||
#[cfg(test)]
|
||||
extern crate kvdb_memorydb;
|
||||
|
||||
use std::{fmt, str};
|
||||
use std::sync::Arc;
|
||||
|
@ -324,7 +324,7 @@ impl JournalDB for OverlayRecentDB {
|
||||
trace!(target: "journaldb", "Delete journal for time #{}.{}: {}, (canon was {}): +{} -{} entries", end_era, index, journal.id, canon_id, journal.insertions.len(), journal.deletions.len());
|
||||
{
|
||||
if *canon_id == journal.id {
|
||||
for h in &journal.insertions {
|
||||
for h in &journal.insertions {
|
||||
if let Some((d, rc)) = journal_overlay.backing_overlay.raw(&to_short_key(h)) {
|
||||
if rc > 0 {
|
||||
canon_insertions.push((h.clone(), d)); //TODO: optimize this to avoid data copy
|
||||
@ -459,8 +459,7 @@ mod tests {
|
||||
use super::*;
|
||||
use hashdb::{HashDB, DBValue};
|
||||
use ethcore_logger::init_log;
|
||||
use journaldb::JournalDB;
|
||||
use kvdb_memorydb;
|
||||
use {kvdb_memorydb, JournalDB};
|
||||
|
||||
fn new_db() -> OverlayRecentDB {
|
||||
let backing = Arc::new(kvdb_memorydb::create(0));
|
||||
|
@ -210,9 +210,8 @@ mod tests {
|
||||
|
||||
use keccak::keccak;
|
||||
use hashdb::{HashDB, DBValue};
|
||||
use kvdb_memorydb;
|
||||
use super::*;
|
||||
use super::super::traits::JournalDB;
|
||||
use {JournalDB, kvdb_memorydb};
|
||||
|
||||
fn new_db() -> RefCountedDB {
|
||||
let backing = Arc::new(kvdb_memorydb::create(0));
|
||||
|
Loading…
Reference in New Issue
Block a user