Skip to content

Commit

Permalink
prover_server: fix sigint handler
Browse files Browse the repository at this point in the history
  • Loading branch information
fborello-lambda committed Nov 22, 2024
1 parent 8ad1d09 commit 95dcec7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions crates/l2/proposer/prover_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ use serde::{Deserialize, Serialize};
use std::{
io::{BufReader, BufWriter},
net::{IpAddr, Shutdown, TcpListener, TcpStream},
sync::{
mpsc::{self, Receiver},
Arc,
},
sync::mpsc::{self, Receiver},
thread,
time::Duration,
};
Expand Down Expand Up @@ -123,16 +120,19 @@ impl ProverServer {

pub async fn run(&mut self, server_config: &ProverServerConfig) {
loop {
if let Err(err) = self.main_logic(server_config).await {
if let Err(err) = self.clone().main_logic(server_config).await {
error!("Prover Server Error: {}", err);
} else {
info!("Prover Server Shut Down");
break;
}

sleep(Duration::from_millis(200)).await;
}
}

async fn main_logic(
&mut self,
mut self,
server_config: &ProverServerConfig,
) -> Result<(), ProverServerError> {
if server_config.dev_mode {
Expand Down
2 changes: 1 addition & 1 deletion crates/l2/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ where
}

pub fn get_address_from_secret_key(secret_key: &SecretKey) -> Address {
let mut buffer = [0u8; 64];
let mut buffer = [0u8; 32];
let public_key = secret_key.public_key(secp256k1::SECP256K1).serialize();
buffer.copy_from_slice(&public_key[1..]);

Expand Down

0 comments on commit 95dcec7

Please sign in to comment.