Skip to content

Commit

Permalink
feat(sidecar): fix nits
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Bostoen committed Jul 26, 2024
1 parent ab1cc96 commit 5b3dd93
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 0 additions & 2 deletions bolt-sidecar/bin/sidecar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ async fn main() -> eyre::Result<()> {

api_server.run(api_events).await?;

// let shutdown_tx = start_rpc_server(&config, api_events).await?;
let mut consensus_state = ConsensusState::new(
beacon_client.clone(),
config.validator_indexes.clone(),
Expand Down Expand Up @@ -182,7 +181,6 @@ async fn main() -> eyre::Result<()> {
},
Ok(_) = tokio::signal::ctrl_c() => {
tracing::info!("Received SIGINT, shutting down...");
// shutdown_tx.send(()).await.ok();
break;
}
}
Expand Down
14 changes: 7 additions & 7 deletions bolt-sidecar/src/api/commitments/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ impl CommitmentsApiServer {
}

/// Creates the server with the given address and shutdown signal.
pub fn with_shutdown<A: ToSocketAddrs>(
self,
addr: A,
signal: impl Future<Output = ()> + Send + 'static,
) -> Self {
pub fn with_shutdown<A, S>(self, addr: A, signal: S) -> Self
where
A: ToSocketAddrs,
S: Future<Output = ()> + Send + 'static,
{
Self {
addr: addr.to_socket_addrs().unwrap().next().unwrap(),
signal: Some(Box::pin(signal)),
Expand Down Expand Up @@ -211,8 +211,8 @@ impl CommitmentsApiServer {

Ok(Json(response))
}
_ => {
tracing::error!("Unknown method: {}", payload.method);
other => {
tracing::error!("Unknown method: {}", other);
Err(Error::UnknownMethod)
}
}
Expand Down
2 changes: 1 addition & 1 deletion bolt-sidecar/src/api/commitments/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub enum Error {
#[error("Internal server error")]
Internal,
/// Missing signature.
#[error("Missing X-Bolt-Signature header")]
#[error("Missing '{SIGNATURE_HEADER}' header")]
NoSignature,
/// Invalid signature.
#[error(transparent)]
Expand Down

0 comments on commit 5b3dd93

Please sign in to comment.