Refactors references to MemoryLruCache in ethcore (#6693)
This commit is contained in:
parent
51b61ccdbf
commit
4df541e47a
11
Cargo.lock
generated
11
Cargo.lock
generated
@ -606,6 +606,7 @@ dependencies = [
|
|||||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"macros 0.1.0",
|
"macros 0.1.0",
|
||||||
|
"memory_cache 0.1.0",
|
||||||
"memorydb 0.1.0",
|
"memorydb 0.1.0",
|
||||||
"migration 0.1.0",
|
"migration 0.1.0",
|
||||||
"native-contracts 0.1.0",
|
"native-contracts 0.1.0",
|
||||||
@ -759,6 +760,7 @@ dependencies = [
|
|||||||
"itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"itertools 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"kvdb 0.1.0",
|
"kvdb 0.1.0",
|
||||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"memory_cache 0.1.0",
|
||||||
"memorydb 0.1.0",
|
"memorydb 0.1.0",
|
||||||
"parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"patricia_trie 0.1.0",
|
"patricia_trie 0.1.0",
|
||||||
@ -1047,6 +1049,7 @@ dependencies = [
|
|||||||
"heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"memory_cache 0.1.0",
|
||||||
"parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"vm 0.1.0",
|
"vm 0.1.0",
|
||||||
@ -1645,6 +1648,14 @@ dependencies = [
|
|||||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "memory_cache"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"heapsize 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memorydb"
|
name = "memorydb"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
@ -32,6 +32,7 @@ ethcore-logger = { path = "../logger" }
|
|||||||
ethcore-stratum = { path = "../stratum" }
|
ethcore-stratum = { path = "../stratum" }
|
||||||
ethcore-util = { path = "../util" }
|
ethcore-util = { path = "../util" }
|
||||||
ethcore-bigint = { path = "../util/bigint" }
|
ethcore-bigint = { path = "../util/bigint" }
|
||||||
|
memory_cache = { path = "../util/memory_cache" }
|
||||||
ethjson = { path = "../json" }
|
ethjson = { path = "../json" }
|
||||||
ethkey = { path = "../ethkey" }
|
ethkey = { path = "../ethkey" }
|
||||||
ethstore = { path = "../ethstore" }
|
ethstore = { path = "../ethstore" }
|
||||||
|
@ -14,6 +14,7 @@ log = "0.3"
|
|||||||
vm = { path = "../vm" }
|
vm = { path = "../vm" }
|
||||||
hash = { path = "../../util/hash" }
|
hash = { path = "../../util/hash" }
|
||||||
parking_lot = "0.4"
|
parking_lot = "0.4"
|
||||||
|
memory_cache = { path = "../../util/memory_cache" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
rustc-hex = "1.0"
|
rustc-hex = "1.0"
|
||||||
|
@ -19,7 +19,7 @@ use hash::KECCAK_EMPTY;
|
|||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use util::cache::MemoryLruCache;
|
use memory_cache::MemoryLruCache;
|
||||||
use bit_set::BitSet;
|
use bit_set::BitSet;
|
||||||
use super::super::instructions;
|
use super::super::instructions;
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ extern crate parking_lot;
|
|||||||
extern crate heapsize;
|
extern crate heapsize;
|
||||||
extern crate vm;
|
extern crate vm;
|
||||||
extern crate hash;
|
extern crate hash;
|
||||||
|
extern crate memory_cache;
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate lazy_static;
|
extern crate lazy_static;
|
||||||
|
@ -40,6 +40,7 @@ stats = { path = "../../util/stats" }
|
|||||||
hash = { path = "../../util/hash" }
|
hash = { path = "../../util/hash" }
|
||||||
triehash = { path = "../../util/triehash" }
|
triehash = { path = "../../util/triehash" }
|
||||||
kvdb = { path = "../../util/kvdb" }
|
kvdb = { path = "../../util/kvdb" }
|
||||||
|
memory_cache = { path = "../../util/memory_cache" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
@ -29,7 +29,7 @@ use time::{SteadyTime, Duration};
|
|||||||
use heapsize::HeapSizeOf;
|
use heapsize::HeapSizeOf;
|
||||||
use bigint::prelude::U256;
|
use bigint::prelude::U256;
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
use util::cache::MemoryLruCache;
|
use memory_cache::MemoryLruCache;
|
||||||
|
|
||||||
/// Configuration for how much data to cache.
|
/// Configuration for how much data to cache.
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
|
@ -92,6 +92,7 @@ extern crate vm;
|
|||||||
extern crate hash;
|
extern crate hash;
|
||||||
extern crate triehash;
|
extern crate triehash;
|
||||||
extern crate kvdb;
|
extern crate kvdb;
|
||||||
|
extern crate memory_cache;
|
||||||
|
|
||||||
#[cfg(feature = "ipc")]
|
#[cfg(feature = "ipc")]
|
||||||
extern crate ethcore_ipc as ipc;
|
extern crate ethcore_ipc as ipc;
|
||||||
|
@ -27,7 +27,7 @@ use parking_lot::{Mutex, RwLock};
|
|||||||
|
|
||||||
use util::*;
|
use util::*;
|
||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
use util::cache::MemoryLruCache;
|
use memory_cache::MemoryLruCache;
|
||||||
use unexpected::Mismatch;
|
use unexpected::Mismatch;
|
||||||
use rlp::{UntrustedRlp, RlpStream};
|
use rlp::{UntrustedRlp, RlpStream};
|
||||||
|
|
||||||
|
@ -129,6 +129,7 @@ extern crate bloomable;
|
|||||||
extern crate vm;
|
extern crate vm;
|
||||||
extern crate wasm;
|
extern crate wasm;
|
||||||
extern crate ethcore_util as util;
|
extern crate ethcore_util as util;
|
||||||
|
extern crate memory_cache;
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate macros;
|
extern crate macros;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
use std::collections::{VecDeque, HashSet};
|
use std::collections::{VecDeque, HashSet};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use lru_cache::LruCache;
|
use lru_cache::LruCache;
|
||||||
use util::cache::MemoryLruCache;
|
use memory_cache::MemoryLruCache;
|
||||||
use util::journaldb::JournalDB;
|
use util::journaldb::JournalDB;
|
||||||
use kvdb::{KeyValueDB, DBTransaction};
|
use kvdb::{KeyValueDB, DBTransaction};
|
||||||
use bigint::hash::H256;
|
use bigint::hash::H256;
|
||||||
|
Loading…
Reference in New Issue
Block a user