Skip to content

Commit

Permalink
feat: a couple more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
prestwich committed May 3, 2024
1 parent f3e49c6 commit 2200c68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/builder/src/tasks/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ impl InProgressBlock {
}
}

/// Get the number of transactions in the block.
pub fn len(&self) -> usize {
self.transactions.len()
}

/// Unseal the block
fn unseal(&mut self) {
self.raw_encoding.take();
Expand All @@ -39,6 +44,7 @@ impl InProgressBlock {

/// Ingest a transaction into the in-progress block. Fails
pub fn ingest_tx(&mut self, tx: &TxEnvelope) {
tracing::info!(hash = %tx.tx_hash(), "ingesting tx");
self.unseal();
self.transactions.push(tx.clone());
}
Expand Down
1 change: 1 addition & 0 deletions crates/builder/src/tasks/submit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ where

#[instrument(skip(self, in_progress), err)]
async fn handle_inbound(&self, in_progress: &InProgressBlock) -> eyre::Result<()> {
tracing::info!(txns = in_progress.len(), "handling inbound block");
let sig_request = self.construct_sig_request(in_progress).await?;

tracing::debug!(
Expand Down

0 comments on commit 2200c68

Please sign in to comment.