pub(crate) fn start_polling<N: Network + 'static>(
network: N,
shutdown_signal: Receiver<()>,
) -> (JoinHandle<()>, Receiver<(VerifyingKey, ProgressMessage)>, Receiver<(VerifyingKey, BlockSyncRequest)>, Receiver<(VerifyingKey, BlockSyncResponse)>)
Expand description
Spawn the poller thread, which polls the Network
for messages and distributes them into receivers
for:
- Progress messages (processed by the
Algorithm
’s execute loop), and - Block sync requests (processed by
BlockSyncServer
), and - Block sync responses (processed by
BlockSyncClient
).