mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 12:49:23 +00:00
Update to the latest tendermint-machine
This commit is contained in:
@@ -176,7 +176,7 @@ impl<T: TendermintValidator> TendermintAuthority<T> {
|
|||||||
let (gossip_tx, mut gossip_rx) = mpsc::unbounded();
|
let (gossip_tx, mut gossip_rx) = mpsc::unbounded();
|
||||||
|
|
||||||
// Create the Tendermint machine
|
// Create the Tendermint machine
|
||||||
let TendermintHandle { mut messages, machine } = {
|
let TendermintHandle { mut step, mut messages, machine } = {
|
||||||
// Set this struct as active
|
// Set this struct as active
|
||||||
*self.import.providers.write().await = Some(providers);
|
*self.import.providers.write().await = Some(providers);
|
||||||
self.active = Some(ActiveAuthority {
|
self.active = Some(ActiveAuthority {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ use sp_api::{BlockId, ProvideRuntimeApi};
|
|||||||
|
|
||||||
use sc_client_api::HeaderBackend;
|
use sc_client_api::HeaderBackend;
|
||||||
|
|
||||||
use tendermint_machine::ext::{BlockNumber, Round, Weights, Signer, SignatureScheme};
|
use tendermint_machine::ext::{BlockNumber, RoundNumber, Weights, Signer, SignatureScheme};
|
||||||
|
|
||||||
use sp_tendermint::TendermintApi;
|
use sp_tendermint::TendermintApi;
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@ impl<T: TendermintClient> Weights for TendermintValidators<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
fn proposer(&self, number: BlockNumber, round: Round) -> u16 {
|
fn proposer(&self, number: BlockNumber, round: RoundNumber) -> u16 {
|
||||||
u16::try_from(
|
u16::try_from(
|
||||||
(number.0 + u64::from(round.0)) % u64::try_from(self.0.read().unwrap().lookup.len()).unwrap(),
|
(number.0 + u64::from(round.0)) % u64::try_from(self.0.read().unwrap().lookup.len()).unwrap(),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user