Prepare for releasing 8.1.0

This commit is contained in:
Igor Katson 2025-06-05 11:38:50 +01:00
parent 3fa55bdc14
commit 28332fd4b9
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
21 changed files with 1387 additions and 978 deletions

View file

@ -34,7 +34,7 @@ parking_lot = "0.12"
tracing = "0.1"
backoff = "0.4.0"
futures = "0.3"
rand = "0.8"
rand = "0.9"
indexmap = "2"
dashmap = { version = "6", features = ["serde"] }
clone_to_owned = { path = "../clone_to_owned", package = "librqbit-clone-to-owned", version = "3" }

View file

@ -121,7 +121,7 @@ impl PeerStore {
pub fn gen_token_for(&self, node_id: Id20, addr: SocketAddr) -> [u8; 4] {
let mut token = [0u8; 4];
rand::thread_rng().fill_bytes(&mut token);
rand::rng().fill_bytes(&mut token);
let mut tokens = self.tokens.write();
tokens.push_back(StoredToken {
token,

View file

@ -131,7 +131,7 @@ impl<'a> Iterator for BucketTreeIterator<'a> {
pub fn generate_random_id(start: &Id20, bits: u8) -> Id20 {
let mut data = [0u8; 20];
rand::thread_rng().fill_bytes(&mut data);
rand::rng().fill_bytes(&mut data);
let mut data = Id20::new(data);
let remaining_bits = 160 - bits;
for bit in 0..remaining_bits {
@ -649,13 +649,13 @@ mod tests {
fn random_id_20() -> Id20 {
let mut id20 = [0u8; 20];
rand::thread_rng().fill(&mut id20);
rand::rng().fill(&mut id20);
Id20::new(id20)
}
fn generate_socket_addr() -> SocketAddr {
let mut ipv4_addr = [0u8; 6];
rand::thread_rng().fill(&mut ipv4_addr);
rand::rng().fill(&mut ipv4_addr);
let ip = Ipv4Addr::new(ipv4_addr[0], ipv4_addr[1], ipv4_addr[2], ipv4_addr[3]);
let port = ((ipv4_addr[4] as u16) << 8) + (ipv4_addr[5] as u16);
SocketAddrV4::new(ip, port).into()