Skip to content

Commit ed1a956

Browse files
committed
cleanup and logging
1 parent b8d83c0 commit ed1a956

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/tasks/env.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ impl EnvTask {
6666
let Some(block) = blocks.last() else {
6767
// This case occurs when there are no changes to the block,
6868
// so we do nothing.
69-
debug!("empty filter changes");
7069
continue;
7170
};
7271
let span = info_span!("EnvTask::task_fut::loop", hash = %block, number = tracing::field::Empty);
@@ -96,10 +95,10 @@ impl EnvTask {
9695
}
9796
};
9897
span.record("number", previous.number);
99-
debug!("retrieved latest block");
10098

10199
let env = self.construct_block_env(&previous);
102-
debug!(?env, "constructed block env");
100+
debug!(block_number = ?env.number, env.basefee, "constructed latest block env");
101+
103102
if sender.send(Some(env)).is_err() {
104103
// The receiver has been dropped, so we can stop the task.
105104
debug!("receiver dropped, stopping task");

src/tasks/submit.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ impl SubmitTask {
395395
debug!(
396396
host_block_number = %sig_request.host_block_number,
397397
ru_chain_id = %sig_request.ru_chain_id,
398+
tx_count = block.tx_count(),
398399
"constructed signature request for host block"
399400
);
400401

@@ -430,7 +431,7 @@ impl SubmitTask {
430431
debug!(slot_number, "403 detected - skipping slot");
431432
return Ok(ControlFlow::Skip);
432433
} else {
433-
// Otherwise, log error and retry
434+
// Otherwise, log error and retry
434435
error!(error = %err, "error handling inbound block");
435436
}
436437

@@ -515,7 +516,10 @@ impl SubmitTask {
515516

516517
// Only attempt each block number once
517518
if result.block.block_number() == last_block_attempted {
518-
debug!(block_number = result.block.block_number(), "block number is unchanged from last attempt - skipping");
519+
debug!(
520+
block_number = result.block.block_number(),
521+
"block number is unchanged from last attempt - skipping"
522+
);
519523
continue;
520524
}
521525

@@ -586,5 +590,5 @@ pub fn bump_gas_from_retries(
586590
max_fee_per_gas, priority_fee, max_fee_per_blob_gas, "calculated bumped gas parameters"
587591
);
588592

589-
(max_fee_per_gas as u128, priority_fee as u128, max_fee_per_blob_gas)
593+
(max_fee_per_gas, priority_fee as u128, max_fee_per_blob_gas)
590594
}

tests/block_builder_test.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ use alloy::{
88
signers::local::PrivateKeySigner,
99
};
1010
use builder::{
11-
tasks::{block::sim::Simulator, cache::CacheTask},
11+
tasks::block::sim::Simulator,
1212
test_utils::{new_signed_tx, setup_logging, setup_test_config, test_block_env},
1313
};
1414
use signet_sim::{SimCache, SimItem};
1515
use signet_types::constants::SignetSystemConstants;
1616
use std::time::{Duration, Instant};
17-
use tokio::{sync::mpsc::unbounded_channel, time::timeout};
1817

1918
/// Tests the `handle_build` method of the `Simulator`.
2019
///

0 commit comments

Comments
 (0)