Skip to content

Commit

Permalink
fix(sidecar): warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
thedevbirb committed Oct 10, 2024
1 parent c3fd5fc commit 6582236
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions bolt-sidecar/src/signer/commit_boost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,12 @@ impl CommitBoostSigner {
}

impl CommitBoostSigner {
/// Get the public key of the signer.
pub fn pubkey(&self) -> BlsPublicKey {
self.get_consensus_pubkey()
}

/// Sign an object root with the Commit Boost domain.
pub async fn sign_commit_boost_root(&self, data: [u8; 32]) -> eyre::Result<BlsSignature> {
// convert the pubkey from ethereum_consensus to commit-boost format
let pubkey = cb_common::signer::BlsPublicKey::from(
Expand Down
2 changes: 1 addition & 1 deletion bolt-sidecar/src/signer/keystore.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! An ERC-2335 keystore signer.
use std::fmt::Debug;
use std::{
ffi::OsString,
fmt::Debug,
fs,
path::{Path, PathBuf},
};
Expand Down
3 changes: 2 additions & 1 deletion bolt-sidecar/src/signer/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::fmt::Debug;

use blst::{min_pk::Signature, BLST_ERROR};
use ethereum_consensus::{crypto::PublicKey as BlsPublicKey, deneb::compute_signing_root};
use rand::RngCore;

use crate::{crypto::bls::BLSSig, ChainConfig};
pub use blst::min_pk::SecretKey as BlsSecretKey;
Expand Down Expand Up @@ -99,7 +98,9 @@ impl LocalSigner {
}

/// Generate a random BLS secret key.
#[cfg(test)]
pub fn random_bls_secret() -> BlsSecretKey {
use rand::RngCore;
let mut rng = rand::thread_rng();
let mut ikm = [0u8; 32];
rng.fill_bytes(&mut ikm);
Expand Down

0 comments on commit 6582236

Please sign in to comment.