Skip to content

Commit 3c9145a

Browse files
authored
chore: Pin rust version in rust-toolchain.toml (#266)
Rust `1.92.0` was released yesterday which caused new issues on CI which weren't caught locally. This PR introduces `rust-toolchain.toml` to pin the rust version to the the new release which enforces CI and local development to always run the same version.
1 parent 64c2ca0 commit 3c9145a

File tree

3 files changed

+23
-18
lines changed

3 files changed

+23
-18
lines changed

dash-spv/tests/handshake_test.rs

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -92,23 +92,25 @@ async fn test_multiple_connect_disconnect_cycles() {
9292
for i in 1..=3 {
9393
println!("Attempt {} to connect to {}", i, peer_addr);
9494

95-
let connect_result = connection.connect_instance().await;
96-
if connect_result.is_ok() {
97-
assert!(connection.is_connected(), "Should be connected after successful connect");
98-
99-
// Brief delay
100-
tokio::time::sleep(Duration::from_millis(100)).await;
101-
102-
// Disconnect
103-
let disconnect_result = connection.disconnect().await;
104-
assert!(disconnect_result.is_ok(), "Disconnect should succeed");
105-
assert!(!connection.is_connected(), "Should be disconnected after disconnect");
106-
107-
// Brief delay before next attempt
108-
tokio::time::sleep(Duration::from_millis(100)).await;
109-
} else {
110-
println!("Connection attempt {} failed: {}", i, connect_result.unwrap_err());
111-
break;
95+
match connection.connect_instance().await {
96+
Ok(_) => {
97+
assert!(connection.is_connected(), "Should be connected after successful connect");
98+
99+
// Brief delay
100+
tokio::time::sleep(Duration::from_millis(100)).await;
101+
102+
// Disconnect
103+
let disconnect_result = connection.disconnect().await;
104+
assert!(disconnect_result.is_ok(), "Disconnect should succeed");
105+
assert!(!connection.is_connected(), "Should be disconnected after disconnect");
106+
107+
// Brief delay before next attempt
108+
tokio::time::sleep(Duration::from_millis(100)).await;
109+
}
110+
Err(e) => {
111+
println!("Connection attempt {} failed: {}", i, e);
112+
break;
113+
}
112114
}
113115
}
114116
}

dash/src/signer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ pub fn ripemd160_sha256(data: &[u8]) -> Vec<u8> {
141141
#[cfg(test)]
142142
mod test {
143143
use super::*;
144+
use crate::PublicKey;
144145
use crate::internal_macros::hex;
145-
use crate::{PublicKey, assert_error_contains};
146146

147147
struct Keys {
148148
private_key: Vec<u8>,

rust-toolchain.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[toolchain]
2+
channel = "1.92.0"
3+
components = ["rustfmt", "clippy"]

0 commit comments

Comments
 (0)