diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index 55dea45e83d364..173cf78ffbdd8e 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -7832,6 +7832,7 @@ dependencies = [ "solana-message", "solana-metrics", "solana-native-token", + "solana-net-utils", "solana-perf", "solana-poh", "solana-poh-config", diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 72ed58bedd0ebc..5d3120487cc3fe 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -64,6 +64,7 @@ solana-measure = { workspace = true } solana-message = { workspace = true } solana-metrics = { workspace = true } solana-native-token = { workspace = true } +solana-net-utils = { workspace = true } solana-perf = { workspace = true } solana-poh = { workspace = true } solana-poh-config = { workspace = true } @@ -112,7 +113,6 @@ solana-compute-budget-interface = { workspace = true } solana-fee-calculator = { workspace = true } solana-fee-structure = { workspace = true } solana-instruction = { workspace = true } -solana-net-utils = { workspace = true } solana-nonce = { workspace = true } solana-nonce-account = { workspace = true } solana-program-option = { workspace = true } diff --git a/rpc/src/rpc.rs b/rpc/src/rpc.rs index 656e93344e1060..06240a943a7159 100644 --- a/rpc/src/rpc.rs +++ b/rpc/src/rpc.rs @@ -47,6 +47,7 @@ use { }, solana_message::{AddressLoader, SanitizedMessage}, solana_metrics::inc_new_counter_info, + solana_net_utils::sockets::unique_port_range_for_tests, solana_perf::packet::PACKET_DATA_SIZE, solana_program_pack::Pack, solana_pubkey::{Pubkey, PUBKEY_BYTES}, @@ -109,7 +110,7 @@ use { cmp::{max, min, Reverse}, collections::{BinaryHeap, HashMap, HashSet}, convert::TryFrom, - net::SocketAddr, + net::{IpAddr, Ipv4Addr, SocketAddr}, str::FromStr, sync::{ atomic::{AtomicBool, AtomicU64, Ordering}, @@ -204,6 +205,10 @@ impl Default for JsonRpcConfig { impl JsonRpcConfig { pub fn default_for_test() -> Self { Self { + faucet_addr: Some(SocketAddr::new( + IpAddr::V4(Ipv4Addr::LOCALHOST), + unique_port_range_for_tests(1).start, + )), full_api: true, disable_health_check: true, ..Self::default()