pub struct BlockSyncServer<N: Network + 'static, K: KVStore> {
config: BlockSyncServerConfiguration,
block_tree_camera: BlockTreeCamera<K>,
last_advertisement: Instant,
receiver: BlockSyncServerStub,
sender: SenderHandle<N>,
shutdown_signal: Receiver<()>,
event_publisher: Option<Sender<Event>>,
}
Fields§
§config: BlockSyncServerConfiguration
§block_tree_camera: BlockTreeCamera<K>
§last_advertisement: Instant
§receiver: BlockSyncServerStub
§sender: SenderHandle<N>
§shutdown_signal: Receiver<()>
§event_publisher: Option<Sender<Event>>
Implementations§
source§impl<N: Network + 'static, K: KVStore> BlockSyncServer<N, K>
impl<N: Network + 'static, K: KVStore> BlockSyncServer<N, K>
pub(crate) fn new( config: BlockSyncServerConfiguration, block_tree_camera: BlockTreeCamera<K>, requests: Receiver<(VerifyingKey, BlockSyncRequest)>, network: N, shutdown_signal: Receiver<()>, event_publisher: Option<Sender<Event>>, ) -> Self
pub(crate) fn start(self) -> JoinHandle<()>
Auto Trait Implementations§
impl<N, K> Freeze for BlockSyncServer<N, K>
impl<N, K> RefUnwindSafe for BlockSyncServer<N, K>where
K: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, K> Send for BlockSyncServer<N, K>
impl<N, K> !Sync for BlockSyncServer<N, K>
impl<N, K> Unpin for BlockSyncServer<N, K>
impl<N, K> UnwindSafe for BlockSyncServer<N, K>where
K: UnwindSafe,
N: UnwindSafe,
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