File tree Expand file tree Collapse file tree 4 files changed +7
-10
lines changed
Expand file tree Collapse file tree 4 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ impl MuxKeysLoader {
211211 & self ,
212212 mux_id : & str ,
213213 chain : Chain ,
214- ssv_api_url : Option < Url > ,
214+ ssv_api_url : Url ,
215215 rpc_url : Option < Url > ,
216216 http_timeout : Duration ,
217217 ) -> eyre:: Result < Vec < BlsPublicKey > > {
@@ -254,10 +254,6 @@ impl MuxKeysLoader {
254254 . await
255255 }
256256 NORegistry :: SSV => {
257- let Some ( ssv_api_url) = ssv_api_url else {
258- bail ! ( "SSV registry requires SSV API URL to be set in the PBS config" ) ;
259- } ;
260-
261257 fetch_ssv_pubkeys (
262258 ssv_api_url,
263259 chain,
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ pub struct PbsConfig {
125125 pub rpc_url : Option < Url > ,
126126 /// URL for the SSV network API
127127 #[ serde( default = "default_ssv_api_url" ) ]
128- pub ssv_api_url : Option < Url > ,
128+ pub ssv_api_url : Url ,
129129 /// Timeout for HTTP requests in seconds
130130 #[ serde( default = "default_u64::<HTTP_TIMEOUT_SECONDS_DEFAULT>" ) ]
131131 pub http_timeout_seconds : u64 ,
@@ -398,6 +398,6 @@ pub async fn load_pbs_custom_config<T: DeserializeOwned>() -> Result<(PbsModuleC
398398}
399399
400400/// Default URL for the SSV network API
401- fn default_ssv_api_url ( ) -> Option < Url > {
402- Some ( Url :: parse ( "https://api.ssv.network/api/v4" ) . expect ( "default URL is valid" ) )
401+ fn default_ssv_api_url ( ) -> Url {
402+ Url :: parse ( "https://api.ssv.network/api/v4" ) . expect ( "default URL is valid" )
403403}
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ use cb_common::{
1717 utils:: { bls_pubkey_from_hex, default_host} ,
1818} ;
1919use eyre:: Result ;
20+ use url:: Url ;
2021
2122pub fn get_local_address ( port : u16 ) -> String {
2223 format ! ( "http://0.0.0.0:{port}" )
@@ -78,7 +79,7 @@ pub fn get_pbs_static_config(port: u16) -> PbsConfig {
7879 min_bid_wei : U256 :: ZERO ,
7980 late_in_slot_time_ms : u64:: MAX ,
8081 extra_validation_enabled : false ,
81- ssv_api_url : None ,
82+ ssv_api_url : Url :: parse ( "https://example.net" ) . unwrap ( ) ,
8283 rpc_url : None ,
8384 http_timeout_seconds : 10 ,
8485 register_validator_retry_limit : u32:: MAX ,
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ async fn test_auto_refresh() -> Result<()> {
8686
8787 // Set up the PBS config
8888 let mut pbs_config = get_pbs_static_config ( pbs_port) ;
89- pbs_config. ssv_api_url = Some ( ssv_api_url. clone ( ) ) ;
89+ pbs_config. ssv_api_url = ssv_api_url. clone ( ) ;
9090 pbs_config. mux_registry_refresh_interval_seconds = 1 ; // Refresh the mux every second
9191 let ( mux_lookup, registry_muxes) = muxes. validate_and_fill ( chain, & pbs_config) . await ?;
9292 let relays = vec ! [ default_relay. clone( ) ] ; // Default relay only
You can’t perform that action at this time.
0 commit comments