Move BoxError to zebrad's lib.rs
For consistency with other crates.
This commit is contained in:
parent
b551d81f8d
commit
391c53aa60
|
|
@ -18,7 +18,7 @@ use zebra_chain::{
|
|||
use zebra_network as zn;
|
||||
use zebra_state as zs;
|
||||
|
||||
use crate::config::ZebradConfig;
|
||||
use crate::{config::ZebradConfig, BoxError};
|
||||
|
||||
mod downloads;
|
||||
use downloads::{AlwaysHedge, Downloads};
|
||||
|
|
@ -114,8 +114,6 @@ pub(super) const BLOCK_VERIFY_TIMEOUT: Duration = Duration::from_secs(180);
|
|||
/// previous sync runs.
|
||||
const SYNC_RESTART_DELAY: Duration = Duration::from_secs(61);
|
||||
|
||||
type BoxError = Box<dyn std::error::Error + Send + Sync + 'static>;
|
||||
|
||||
/// Helps work around defects in the bitcoin protocol by checking whether
|
||||
/// the returned hashes actually extend a chain tip.
|
||||
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)]
|
||||
|
|
|
|||
|
|
@ -26,6 +26,13 @@
|
|||
#[macro_use]
|
||||
extern crate tracing;
|
||||
|
||||
/// Error type alias to make working with tower traits easier.
|
||||
///
|
||||
/// Note: the 'static lifetime bound means that the *type* cannot have any
|
||||
/// non-'static lifetimes, (e.g., when a type contains a borrow and is
|
||||
/// parameterized by 'a), *not* that the object itself has 'static lifetime.
|
||||
pub type BoxError = Box<dyn std::error::Error + Send + Sync + 'static>;
|
||||
|
||||
mod components;
|
||||
|
||||
pub mod application;
|
||||
|
|
|
|||
Loading…
Reference in New Issue