Skip to content

Commit

Permalink
fix(sidecar): commit boost flag rename
Browse files Browse the repository at this point in the history
  • Loading branch information
thedevbirb committed Oct 7, 2024
1 parent 1d15944 commit e439a66
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions bolt-sidecar/src/client/commit_boost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ pub enum CommitBoostError {
#[allow(unused)]
impl CommitBoostSigner {
/// Create a new [CommitBoostSigner] instance
pub async fn new(signer_server_address: String, jwt: &str) -> Result<Self, CommitBoostError> {
let signer_client = SignerClient::new(signer_server_address, jwt)?;
pub async fn new(signer_server_address: &str, jwt: &str) -> Result<Self, CommitBoostError> {
let signer_client = SignerClient::new(signer_server_address.to_string(), jwt)?;

let client = Self {
signer_client,
Expand Down Expand Up @@ -160,7 +160,7 @@ mod test {
return Ok(());
}
};
let signer = CommitBoostSigner::new(signer_server_address, &jwt_hex).await.unwrap();
let signer = CommitBoostSigner::new(&signer_server_address, &jwt_hex).await.unwrap();

// Generate random data for the test
let mut rng = rand::thread_rng();
Expand Down Expand Up @@ -190,7 +190,7 @@ mod test {
return Ok(());
}
};
let signer = CommitBoostSigner::new(signer_server_address, &jwt_hex).await.unwrap();
let signer = CommitBoostSigner::new(&signer_server_address, &jwt_hex).await.unwrap();
let pubkey = signer.get_proxy_ecdsa_pubkey();

// Generate random data for the test
Expand Down
8 changes: 4 additions & 4 deletions bolt-sidecar/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ pub struct Config {
/// The engine API url
pub engine_api_url: Url,
/// URL for the commit-boost sidecar
pub commit_boost_address: Option<String>,
/// The JWT secret token to authenticate calls to the commit-boost
pub commit_boost_url: Option<String>,
/// The JWT secret token to authenticate calls to commit-boost
pub commit_boost_jwt_hex: Option<String>,
/// Private key to use for signing preconfirmation requests
pub private_key: Option<SecretKey>,
Expand Down Expand Up @@ -141,7 +141,7 @@ impl Default for Config {
Self {
rpc_port: DEFAULT_RPC_PORT,
constraints_proxy_port: DEFAULT_CONSTRAINTS_PROXY_PORT,
commit_boost_address: None,
commit_boost_url: None,
commit_boost_jwt_hex: None,
constraints_url: "http://localhost:3030".parse().expect("Valid URL"),
beacon_api_url: "http://localhost:5052".parse().expect("Valid URL"),
Expand Down Expand Up @@ -216,7 +216,7 @@ impl TryFrom<Opts> for Config {
if let Some(commit_boost_url) = &opts.signing.commit_boost_url {
if let Ok(url) = Url::parse(commit_boost_url) {
if let Ok(socket_addrs) = url.socket_addrs(|| None) {
config.commit_boost_address = Some(socket_addrs[0].to_string());
config.commit_boost_url = Some(socket_addrs[0].to_string());
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion bolt-sidecar/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl SidecarDriver<StateClient, CommitBoostSigner, CommitBoostSigner> {
let state_client = StateClient::new(cfg.execution_api_url.clone());

let commit_boost_signer = CommitBoostSigner::new(
cfg.commit_boost_address.clone().expect("CommitBoost URL must be provided"),
&cfg.commit_boost_url.clone().expect("CommitBoost URL must be provided"),
&cfg.commit_boost_jwt_hex.clone().expect("CommitBoost JWT must be provided"),
)
.await?;
Expand Down

0 comments on commit e439a66

Please sign in to comment.