Skip to content

Commit

Permalink
chore(batcher): add logs (#1531)
Browse files Browse the repository at this point in the history
  • Loading branch information
alonh5 authored Oct 22, 2024
1 parent 7dc9590 commit c9bdb58
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crates/batcher/src/block_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use thiserror::Error;
use tokio::sync::Mutex;
use tokio::{pin, time};
use tokio_stream::StreamExt;
use tracing::{debug, info};
use tracing::{debug, info, trace};

use crate::papyrus_state::PapyrusReader;
use crate::proposal_manager::InputTxStream;
Expand Down Expand Up @@ -161,7 +161,10 @@ impl BlockBuilderTrait for BlockBuilder {
debug!("No further transactions to execute, timeout was reached.");
break;
}
Ok(Some(tx_chunk)) => tx_chunk,
Ok(Some(tx_chunk)) => {
debug!("Got a chunk of {} transactions.", tx_chunk.len());
tx_chunk
}
Ok(None) => return Err(BlockBuilderError::InputStreamTerminated),
};
let mut executor_input_chunk = vec![];
Expand All @@ -170,6 +173,7 @@ impl BlockBuilderTrait for BlockBuilder {
.push(BlockifierTransaction::Account(AccountTransaction::try_from(tx)?));
}
let results = self.executor.lock().await.add_txs_to_block(&executor_input_chunk);
trace!("Transaction execution results: {:?}", results);
should_close_block = collect_execution_results_and_stream_txs(
next_tx_chunk,
results,
Expand Down

0 comments on commit c9bdb58

Please sign in to comment.