NAC_Blockchain/nac-cbpp/src/lib.rs

25 lines
572 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//! 宪政区块生产协议CBPP - Constitutional Block Production Protocol
//!
//! NAC公链的共识机制结合DPoS和BFT的优点
pub mod block;
pub mod validator;
pub mod consensus;
pub mod vote;
pub use block::{Block, BlockHeader, BlockBody};
pub use validator::{Validator, ValidatorSet};
pub use consensus::{ConsensusEngine, ConsensusState};
pub use vote::{Vote, VoteType};
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_cbpp_basic() {
let engine = ConsensusEngine::new();
assert!(engine.is_initialized());
}
}