pub(crate) struct Algorithm<N: Network + 'static, K: KVStore, A: App<K> + 'static> {
chain_id: ChainID,
pm_stub: ProgressMessageStub,
block_tree: BlockTreeSingleton<K>,
app: A,
hotstuff: HotStuff<N>,
pacemaker: Pacemaker<N>,
block_sync_client: BlockSyncClient<N>,
shutdown_signal: Receiver<()>,
}
Fields§
§chain_id: ChainID
§pm_stub: ProgressMessageStub
§block_tree: BlockTreeSingleton<K>
§app: A
§hotstuff: HotStuff<N>
§pacemaker: Pacemaker<N>
§block_sync_client: BlockSyncClient<N>
§shutdown_signal: Receiver<()>
Implementations§
source§impl<N: Network + 'static, K: KVStore, A: App<K> + 'static> Algorithm<N, K, A>
impl<N: Network + 'static, K: KVStore, A: App<K> + 'static> Algorithm<N, K, A>
pub(crate) fn new( chain_id: ChainID, hotstuff_config: HotStuffConfiguration, pacemaker_config: PacemakerConfiguration, block_sync_client_config: BlockSyncClientConfiguration, block_tree: BlockTreeSingleton<K>, app: A, network: N, progress_msg_receiver: Receiver<(VerifyingKey, ProgressMessage)>, progress_msg_buffer_capacity: BufferSize, block_sync_response_receiver: Receiver<(VerifyingKey, BlockSyncResponse)>, shutdown_signal: Receiver<()>, event_publisher: Option<Sender<Event>>, ) -> Self
pub(crate) fn start(self) -> JoinHandle<()>
fn execute(self)
Auto Trait Implementations§
impl<N, K, A> Freeze for Algorithm<N, K, A>
impl<N, K, A> RefUnwindSafe for Algorithm<N, K, A>
impl<N, K, A> Send for Algorithm<N, K, A>
impl<N, K, A> !Sync for Algorithm<N, K, A>
impl<N, K, A> Unpin for Algorithm<N, K, A>
impl<N, K, A> UnwindSafe for Algorithm<N, K, A>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more