From 739b1eacd55affd0298e6b01c5dab8219635b9f4 Mon Sep 17 00:00:00 2001 From: Marcin Date: Fri, 29 Nov 2024 09:53:03 +0100 Subject: [PATCH 1/2] Bump Rust to 1.79 (from 1.77) --- consensus/src/extension/election.rs | 2 +- consensus/src/testing/mod.rs | 1 - examples/ordering/src/main.rs | 3 +-- rust-toolchain.toml | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/consensus/src/extension/election.rs b/consensus/src/extension/election.rs index fca1e225..f409676d 100644 --- a/consensus/src/extension/election.rs +++ b/consensus/src/extension/election.rs @@ -94,7 +94,7 @@ impl CandidateElection { fn vote(&mut self, voter: &U) -> Result<(), CandidateOutcome> { // If the vote is already computed we are done. - if self.votes.get(&voter.hash()).is_some() { + if self.votes.contains_key(&voter.hash()) { return Ok(()); } // Votes for old units are never used, so we just return. diff --git a/consensus/src/testing/mod.rs b/consensus/src/testing/mod.rs index ce132155..64cd8c04 100644 --- a/consensus/src/testing/mod.rs +++ b/consensus/src/testing/mod.rs @@ -1,4 +1,3 @@ -#![cfg(test)] mod alerts; mod byzantine; mod crash; diff --git a/examples/ordering/src/main.rs b/examples/ordering/src/main.rs index 5b4e3ac4..f3ff1c1d 100644 --- a/examples/ordering/src/main.rs +++ b/examples/ordering/src/main.rs @@ -9,8 +9,7 @@ use dataio::{Data, DataProvider, FinalizationHandler}; use futures::{channel::oneshot, io, StreamExt}; use log::{debug, error, info}; use network::Network; -use std::sync::Arc; -use std::{path::Path, time::Duration}; +use std::{path::Path, sync::Arc, time::Duration}; use time::{macros::format_description, OffsetDateTime}; use tokio::fs::{self, File}; use tokio_util::compat::{Compat, TokioAsyncWriteCompatExt}; diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 83025f97..628740b1 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.77.0" +channel = "1.79.0" From 03a6c9de143434bd5188fb0fdbac141207717a92 Mon Sep 17 00:00:00 2001 From: Marcin Date: Fri, 29 Nov 2024 09:58:57 +0100 Subject: [PATCH 2/2] Bump version --- Cargo.lock | 2 +- consensus/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0cc922ef..645ebdb1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,7 +28,7 @@ dependencies = [ [[package]] name = "aleph-bft" -version = "0.38.0" +version = "0.38.1" dependencies = [ "aleph-bft-mock", "aleph-bft-rmc", diff --git a/consensus/Cargo.toml b/consensus/Cargo.toml index 8be4e7e5..75bd3dbf 100644 --- a/consensus/Cargo.toml +++ b/consensus/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aleph-bft" -version = "0.38.0" +version = "0.38.1" edition = "2021" authors = ["Cardinal Cryptography"] categories = ["algorithms", "data-structures", "cryptography", "database"]