mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-03 05:43:08 +00:00
23 lines
544 B
Rust
23 lines
544 B
Rust
use std::sync::Arc;
|
|
|
|
use networking::peer_manager::PeerManager;
|
|
use tokio::sync::Mutex;
|
|
|
|
#[derive(Debug)]
|
|
///Entrypoint to consensus.
|
|
/// Manages consensus protocol.
|
|
pub struct ConsensusManager {
|
|
pub peer_manager: Arc<Mutex<PeerManager>>,
|
|
}
|
|
|
|
impl ConsensusManager {
|
|
pub fn new(peer_manager: Arc<Mutex<PeerManager>>) -> Self {
|
|
Self { peer_manager }
|
|
}
|
|
|
|
//ToDo: change block from generic value into struct, when data block will be defined
|
|
pub fn vote(&self, _block: serde_json::Value) -> bool {
|
|
todo!()
|
|
}
|
|
}
|