chaindev/lib.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
//!
//! # ChainDEV
//!
//! Blockchain cluster management,
//! supports both single-machine multi-process mode
//! and multi-machine distributed mode.
//!
#![deny(warnings)]
// #![warn(missing_docs)]
pub mod common;
#[cfg(feature = "beacon_based")]
pub mod beacon_based;
#[cfg(feature = "tendermint_based")]
pub mod tendermint_based;
/////////////////////////////////////////////////////////////////////
pub use common::*;
#[cfg(feature = "tendermint_based")]
pub use tendermint_based::dev as tendermint_dev;
#[cfg(feature = "tendermint_based")]
pub use tendermint_based::ddev as tendermint_ddev;
#[cfg(feature = "beacon_based")]
pub use beacon_based::dev as beacon_dev;
#[cfg(feature = "beacon_based")]
pub use beacon_based::ddev as beacon_ddev;
#[cfg(feature = "beacon_based")]
pub use beacon_based::ddev::{host, remote};
/////////////////////////////////////////////////////////////////////
#[macro_export]
macro_rules! check_errlist {
($errlist: expr) => {{
if $errlist.is_empty() {
Ok(())
} else {
Err(eg!($errlist
.iter()
.map(|e| e.to_string())
.collect::<Vec<_>>()
.join("\n")))
}
}};
// useful fo some middle returns
(@$errlist: expr) => {{
if !$errlist.is_empty() {
return Err(eg!($errlist
.iter()
.map(|e| e.to_string())
.collect::<Vec<_>>()
.join("\n")));
}
}};
}
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////