Function aleph_bft::run_session

source ·
pub async fn run_session<H: Hasher, D: Data, DP: DataProvider<D>, FH: FinalizationHandler<D>, US: AsyncWrite + Send + Sync + 'static, UL: AsyncRead + Send + Sync + 'static, N: Network<NetworkData<H, D, MK::Signature, MK::PartialMultisignature>> + 'static, SH: SpawnHandle, MK: MultiKeychain>(
    config: Config,
    local_io: LocalIO<D, DP, FH, 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.