Update binaries/cuprated/src/rpc/handlers/json_rpc.rs

Co-authored-by: Boog900 <boog900@tutanota.com>
This commit is contained in:
hinto-janai 2025-01-16 19:38:30 -05:00 committed by GitHub
parent bc6fc0ae13
commit c7443c9140
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -639,8 +639,7 @@ async fn set_bans(
// TODO: support non-clearnet addresses. // TODO: support non-clearnet addresses.
// <https://architecture.cuprate.org/oddities/le-ipv4.html> // <https://architecture.cuprate.org/oddities/le-ipv4.html>
let [a, b, c, d] = peer.ip.to_le_bytes(); let ip = Ipv4Addr::from(peer.ip.to_le_bytes());
let ip = Ipv4Addr::new(a, b, c, d);
let address = SocketAddr::V4(SocketAddrV4::new(ip, 0)); let address = SocketAddr::V4(SocketAddrV4::new(ip, 0));
let ban = if peer.ban { let ban = if peer.ban {