mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 03:31:10 +00:00
round-robin message handler
This commit is contained in:
@@ -45,13 +45,14 @@ use tokio_timer::Timer;
|
||||
|
||||
use table::Table;
|
||||
|
||||
pub mod bft;
|
||||
pub mod table;
|
||||
mod bft;
|
||||
mod round_robin;
|
||||
mod table;
|
||||
|
||||
/// Context necessary for agreement.
|
||||
pub trait Context: Send + Clone {
|
||||
/// A validator ID
|
||||
type ValidatorId: Debug + Hash + Eq + Clone;
|
||||
type ValidatorId: Debug + Hash + Eq + Clone + Ord;
|
||||
/// The digest (hash or other unique attribute) of a candidate.
|
||||
type Digest: Debug + Hash + Eq + Clone;
|
||||
/// The group ID type
|
||||
@@ -412,6 +413,7 @@ pub fn agree<C: Context + 'static>(params: AgreementParams<C>)
|
||||
in_out.map_err(|_| Error::IoTerminated),
|
||||
out_in.sink_map_err(|_| Error::IoTerminated),
|
||||
);
|
||||
|
||||
Agreement {
|
||||
bft: Box::new(agreement),
|
||||
input: in_in,
|
||||
|
||||
Reference in New Issue
Block a user