diff --git a/grin/src/adapters.rs b/grin/src/adapters.rs index 8e8fcc0bf..a30aaeb72 100644 --- a/grin/src/adapters.rs +++ b/grin/src/adapters.rs @@ -22,6 +22,7 @@ use core::core::hash::{Hash, Hashed}; use core::core::target::Difficulty; use p2p::{self, NetAdapter, Server}; use util::OneTime; +use store; use sync; /// Implementation of the NetAdapter for the blockchain. Gets notified when new @@ -122,7 +123,7 @@ impl NetAdapter for NetToChainAdapter { let known = self.chain_store.get_block_header(&locator[0]); let header = match known { Ok(header) => header, - Err(chain::types::Error::NotFoundErr) => { + Err(store::Error::NotFoundErr) => { return self.locate_headers(locator[1..].to_vec()); } Err(e) => { @@ -138,7 +139,7 @@ impl NetAdapter for NetToChainAdapter { let header = self.chain_store.get_header_by_height(h); match header { Ok(head) => headers.push(head), - Err(chain::types::Error::NotFoundErr) => break, + Err(store::Error::NotFoundErr) => break, Err(e) => { error!("Could not build header locator: {:?}", e); return vec![]; diff --git a/grin/src/server.rs b/grin/src/server.rs index 6e32e64c3..7d07caf6f 100644 --- a/grin/src/server.rs +++ b/grin/src/server.rs @@ -29,6 +29,7 @@ use chain::ChainStore; use core; use miner; use p2p; +use store; use sync; /// Errors than can be reported by a server implementation, mostly wraps @@ -40,7 +41,7 @@ pub enum Error { /// Peer connection error PeerErr(core::ser::Error), /// Data store error - StoreErr(chain::types::Error), + StoreErr(store::Error), } /// Full server configuration, aggregating configurations required for the @@ -174,7 +175,7 @@ fn store_head(config: &ServerConfig) // check if we have a head in store, otherwise the genesis block is it let head = match chain_store.head() { Ok(tip) => tip, - Err(chain::types::Error::NotFoundErr) => { + Err(store::Error::NotFoundErr) => { debug!("No genesis block found, creating and saving one."); let mut gen = core::genesis::genesis(); if config.cuckoo_size > 0 {