Skip to content

Commit 82c2173

Browse files
JuArceOppen
authored andcommitted
fix errors [wip]
1 parent deca396 commit 82c2173

4 files changed

Lines changed: 6 additions & 7 deletions

File tree

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
@@ -15,7 +15,7 @@ use retry::{retry_function, RetryError};
1515
use tokio::time::{timeout, Instant};
1616
use types::batch_state::BatchState;
1717
use types::user_state::UserState;
18-
use boring::ssl::{SslMethod, SslAcceptor, SslStream, SslFiletype};
18+
use boring::ssl::{SslMethod, SslAcceptor, SslFiletype};
1919
use std::collections::HashMap;
2020
use std::env;
2121
use std::net::SocketAddr;
@@ -263,12 +263,11 @@ impl Batcher {
263263
}
264264

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

273272
// Create the event loop and TCP listener we'll accept connections on.
274273
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)