mirror of
https://github.com/mimblewimble/grin.git
synced 2025-04-25 03:41:14 +03:00
Minor compilation errors due to moving store Error.
This commit is contained in:
parent
786da24653
commit
510feadce6
2 changed files with 6 additions and 4 deletions
grin/src
|
@ -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![];
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue