updates based on upstream

This commit is contained in:
yeastplume
2019-02-27 12:50:05 +00:00
parent 6a196ffa90
commit 238cd7225e
6 changed files with 253 additions and 332 deletions
+1 -3
View File
@@ -13,7 +13,6 @@
// limitations under the License.
use std::cell::RefCell;
use std::sync::Arc;
use std::{fs, path};
// for writing storedtransaction files
@@ -112,8 +111,7 @@ impl<C, K> LMDBBackend<C, K> {
fs::create_dir_all(&stored_tx_path)
.expect("Couldn't create wallet backend tx storage directory!");
let lmdb_env = Arc::new(store::new_env(db_path.to_str().unwrap().to_string()));
let store = store::Store::open(lmdb_env, DB_DIR);
let store = store::Store::new(db_path.to_str().unwrap(), Some(DB_DIR), None)?;
// Make sure default wallet derivation path always exists
// as well as path (so it can be retrieved by batches to know where to store
@@ -34,7 +34,6 @@ use grin_api as api;
use grin_chain as chain;
use grin_core as core;
use grin_keychain as keychain;
use grin_store as store;
use grin_util as util;
use serde_json;
use std::collections::HashMap;
@@ -101,10 +100,8 @@ where
let genesis_block = pow::mine_genesis_block().unwrap();
let verifier_cache = Arc::new(RwLock::new(LruVerifierCache::new()));
let dir_name = format!("{}/.grin", chain_dir);
let db_env = Arc::new(store::new_env(dir_name.to_string()));
let c = Chain::init(
dir_name.to_string(),
db_env,
Arc::new(NoopAdapter {}),
genesis_block,
pow::verify_size,