Skip to content

Commit 25e93f7

Browse files
JuArceOppen
authored andcommitted
fix errors [wip]
1 parent 8a0153a commit 25e93f7

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

batcher/aligned-batcher/src/connection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use std::sync::Arc;
2-
use boring::ssl::{SslStream};
32

43
use crate::types::{batch_queue::BatchQueueEntry, errors::BatcherError};
54
use aligned_sdk::{
@@ -11,6 +10,7 @@ use lambdaworks_crypto::merkle_tree::merkle::MerkleTree;
1110
use log::{debug, error};
1211
use serde::Serialize;
1312
use tokio::{net::TcpStream, sync::RwLock};
13+
use tokio_boring::SslStream;
1414
use tokio_tungstenite::{
1515
tungstenite::{Error, Message},
1616
WebSocketStream,

batcher/aligned-batcher/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use retry::{retry_function, RetryError};
1414
use tokio::time::timeout;
1515
use types::batch_state::BatchState;
1616
use types::user_state::UserState;
17-
use boring::ssl::{SslMethod, SslAcceptor, SslStream, SslFiletype};
17+
use boring::ssl::{SslMethod, SslAcceptor, SslFiletype};
1818
use std::collections::HashMap;
1919
use std::env;
2020
use std::net::SocketAddr;
@@ -262,12 +262,11 @@ impl Batcher {
262262
}
263263

264264
pub async fn listen_connections(self: Arc<Self>, address: &str, cert: PathBuf, key: PathBuf) -> Result<(), BatcherError> {
265-
let mut acceptor;
266265
let mut acceptor_builder = SslAcceptor::mozilla_intermediate_v5(SslMethod::tls()).unwrap();
267266
acceptor_builder.set_private_key_file(key, SslFiletype::PEM).unwrap();
268267
acceptor_builder.set_certificate_chain_file(cert).unwrap();
269268
acceptor_builder.check_private_key().unwrap();
270-
acceptor = Arc::new(acceptor_builder.build());
269+
let acceptor = Arc::new(acceptor_builder.build());
271270

272271
// Create the event loop and TCP listener we'll accept connections on.
273272
let listener = TcpListener::bind(address)

batcher/aligned-batcher/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ struct Cli {
2525
#[arg(short, long)]
2626
port: Option<u16>,
2727
/// cert file
28-
#[argh(option, short = 'c')]
28+
#[arg(long, short = 'c')]
2929
cert: PathBuf,
3030
/// key file
31-
#[argh(option, short = 'k')]
31+
#[arg(long, short = 'k')]
3232
key: PathBuf,
3333
}
3434

batcher/aligned/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub struct SubmitArgs {
6666
#[arg(
6767
name = "Batcher connection address",
6868
long = "batcher_url",
69-
default_value = "ws://localhost:8080"
69+
default_value = "wss://localhost:8080"
7070
)]
7171
batcher_url: String,
7272
#[arg(

0 commit comments

Comments
 (0)