separated kvdb into 3 crates: kvdb, kvdb-memorydb && kvdb-rocksdb, #6693

This commit is contained in:
debris
2017-10-12 15:36:27 +02:00
parent bfff19ca9f
commit eb526b7769
60 changed files with 1106 additions and 968 deletions

View File

@@ -14,4 +14,7 @@ serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
log = "0.3"
[dev-dependencies]
ethkey = { path = "../ethkey" }
kvdb-memorydb = { path = "../util/kvdb-memorydb" }

View File

@@ -44,6 +44,8 @@ extern crate log;
#[cfg(test)]
extern crate ethkey;
#[cfg(test)]
extern crate kvdb_memorydb;
const LOCAL_TRANSACTIONS_KEY: &'static [u8] = &*b"LOCAL_TXS";
@@ -243,7 +245,7 @@ mod tests {
#[test]
fn twice_empty() {
let db = Arc::new(::kvdb::in_memory(0));
let db = Arc::new(::kvdb_memorydb::in_memory(0));
{
let store = super::create(db.clone(), None, Dummy(vec![]));
@@ -272,7 +274,7 @@ mod tests {
PendingTransaction::new(signed, condition)
}).collect();
let db = Arc::new(::kvdb::in_memory(0));
let db = Arc::new(::kvdb_memorydb::in_memory(0));
{
// nothing written yet, will write pending.
@@ -311,7 +313,7 @@ mod tests {
PendingTransaction::new(signed, None)
});
let db = Arc::new(::kvdb::in_memory(0));
let db = Arc::new(::kvdb_memorydb::in_memory(0));
{
// nothing written, will write bad.
let store = super::create(db.clone(), None, Dummy(transactions.clone()));