pub async fn run_session<DP: DataProvider, UFH: UnitFinalizationHandler<Data = DP::Output>, US: AsyncWrite + Send + Sync + 'static, UL: AsyncRead + Send + Sync + 'static, N: Network<NetworkData<UFH::Hasher, DP::Output, MK::Signature, MK::PartialMultisignature>>, SH: SpawnHandle, MK: MultiKeychain>(
config: Config,
local_io: LocalIO<DP, UFH, US, UL>,
network: N,
keychain: MK,
spawn_handle: SH,
terminator: Terminator,
)Expand description
Starts the consensus algorithm as an async task. It stops establishing consensus for new data items after
reaching the threshold specified in Config::max_round or upon receiving a stop signal from exit.
For a detailed description of the consensus implemented by run_session see
docs for devs
or the original paper.