Skip to content

Commit b64bcb6

Browse files
committed
fix: compilation errors
1 parent 9e9ab02 commit b64bcb6

File tree

6 files changed

+9
-12
lines changed

6 files changed

+9
-12
lines changed

batcher/aligned-batcher/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,6 @@ impl Batcher {
602602
};
603603

604604
info!("Verification data message handled");
605-
send_message(ws_conn_sink, ResponseMessage::Valid).await;
606605
Ok(())
607606
}
608607

@@ -1267,7 +1266,6 @@ impl Batcher {
12671266
};
12681267

12691268
info!("Non-paying verification data message handled");
1270-
send_message(ws_sink, ResponseMessage::Valid).await;
12711269
Ok(())
12721270
}
12731271

batcher/aligned-sdk/src/communication/messaging.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ async fn process_batch_inclusion_data(
148148
Ok(ResponseMessage::InvalidMaxFee) => {
149149
return Err(SubmitError::InvalidMaxFee);
150150
}
151-
Ok(ResponseMessage::InsufficientBalance) => {
152-
return Err(SubmitError::InsufficientBalance);
151+
Ok(ResponseMessage::InsufficientBalance(addr)) => {
152+
return Err(SubmitError::InsufficientBalance(addr));
153153
}
154154
Ok(ResponseMessage::InvalidChainId) => {
155155
return Err(SubmitError::InvalidChainId);

batcher/aligned-sdk/src/core/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub enum SubmitError {
9797
InvalidProof(ProofInvalidReason),
9898
ProofTooLarge,
9999
InvalidReplacementMessage,
100-
InsufficientBalance,
100+
InsufficientBalance(H160),
101101
InvalidPaymentServiceAddress(H160, H160),
102102
BatchSubmissionFailed(String),
103103
AddToBatchError,
@@ -200,7 +200,7 @@ impl fmt::Display for SubmitError {
200200
SubmitError::InvalidProof(reason) => write!(f, "Invalid proof {}", reason),
201201
SubmitError::ProofTooLarge => write!(f, "Proof too Large"),
202202
SubmitError::InvalidReplacementMessage => write!(f, "Invalid replacement message"),
203-
SubmitError::InsufficientBalance => write!(f, "Insufficient balance"),
203+
SubmitError::InsufficientBalance(addr) => write!(f, "Insufficient balance, address: {}", addr),
204204
SubmitError::InvalidPaymentServiceAddress(received_addr, expected_addr) => {
205205
write!(
206206
f,

batcher/aligned-sdk/src/core/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ pub enum ResponseMessage {
361361
InvalidSignature,
362362
ProofTooLarge,
363363
InvalidMaxFee,
364-
InsufficientBalance,
364+
InsufficientBalance(Address),
365365
InvalidChainId,
366366
InvalidReplacementMessage,
367367
AddToBatchError,

batcher/aligned-sdk/src/sdk.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use crate::{
1313
errors,
1414
types::{
1515
AlignedVerificationData, Network, PriceEstimate, ProvingSystemId, VerificationData,
16-
VerificationDataCommitment,
1716
},
1817
},
1918
eth::{
@@ -39,14 +38,14 @@ use log::{debug, info};
3938

4039
use futures_util::{
4140
stream::{SplitSink, SplitStream},
42-
StreamExt, TryStreamExt,
41+
StreamExt, TryStreamExt, SinkExt
4342
};
4443

4544
use std::fs::File;
4645
use std::io::Write;
4746
use std::path::PathBuf;
48-
4947
use serde_json::json;
48+
5049
/// Submits multiple proofs to the batcher to be verified in Aligned and waits for the verification on-chain.
5150
/// # Arguments
5251
/// * `batcher_url` - The url of the batcher to which the proof will be submitted.

batcher/aligned/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,8 @@ async fn handle_submit_err(err: SubmitError, nonce_file: &str) {
550550
error!("Batch was reset. try resubmitting the proof");
551551
}
552552
SubmitError::InvalidProof(reason) => error!("Submitted proof is invalid: {}", reason),
553-
SubmitError::InsufficientBalance => {
554-
error!("Insufficient balance to pay for the transaction")
553+
SubmitError::InsufficientBalance(sender_address) => {
554+
error!("Insufficient balance to pay for the transaction, address: {}", sender_address)
555555
}
556556
_ => {}
557557
}

0 commit comments

Comments
 (0)