From c7443c9140c845ca0708006c470d5d69d9ac38ba Mon Sep 17 00:00:00 2001 From: hinto-janai Date: Thu, 16 Jan 2025 19:38:30 -0500 Subject: [PATCH] Update binaries/cuprated/src/rpc/handlers/json_rpc.rs Co-authored-by: Boog900 --- binaries/cuprated/src/rpc/handlers/json_rpc.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/binaries/cuprated/src/rpc/handlers/json_rpc.rs b/binaries/cuprated/src/rpc/handlers/json_rpc.rs index 1ca244a..dace71b 100644 --- a/binaries/cuprated/src/rpc/handlers/json_rpc.rs +++ b/binaries/cuprated/src/rpc/handlers/json_rpc.rs @@ -639,8 +639,7 @@ async fn set_bans( // TODO: support non-clearnet addresses. // - let [a, b, c, d] = peer.ip.to_le_bytes(); - let ip = Ipv4Addr::new(a, b, c, d); + let ip = Ipv4Addr::from(peer.ip.to_le_bytes()); let address = SocketAddr::V4(SocketAddrV4::new(ip, 0)); let ban = if peer.ban {