Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ncitron committed Dec 11, 2024
1 parent 426d468 commit aa37569
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions opstack/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,14 @@ fn verify_unsafe_signer(config: Config, signer: Arc<Mutex<Address>>) {
eth_config.default_checkpoint = checkpoint;
}

let mut eth_consensus = EthConsensusClient::<MainnetConsensusSpec, HttpRpc, ConfigDB>::new(
&eth_config
.consensus_rpc
.clone()
.ok_or_else(|| eyre!("missing consensus rpc"))?,
Arc::new(eth_config.into()),
)?;
let mut eth_consensus =
EthConsensusClient::<MainnetConsensusSpec, HttpRpc, ConfigDB>::new(
&eth_config
.consensus_rpc
.clone()
.ok_or_else(|| eyre!("missing consensus rpc"))?,
Arc::new(eth_config.into()),
)?;

let block = eth_consensus
.block_recv()
Expand Down Expand Up @@ -235,7 +236,8 @@ fn verify_unsafe_signer(config: Config, signer: Arc<Mutex<Address>>) {
}

// Replace unsafe signer if different
let verified_signer = Address::from_slice(&storage_proof.value.to_be_bytes::<32>()[12..32]);
let verified_signer =
Address::from_slice(&storage_proof.value.to_be_bytes::<32>()[12..32]);
{
let mut curr_signer = signer.lock().map_err(|_| eyre!("failed to lock signer"))?;
if verified_signer != *curr_signer {
Expand Down

0 comments on commit aa37569

Please sign in to comment.