Skip to content

Commit 662ed17

Browse files
committed
fix tests
1 parent e008127 commit 662ed17

File tree

4 files changed

+4
-22
lines changed

4 files changed

+4
-22
lines changed

crates/chain-orchestrator/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,6 @@ impl<
405405
self.sync_state.l1_mut().set_syncing();
406406
let unwind_result = self.database.unwind(block_number).await?;
407407

408-
println!("Unwind result: {:?}", unwind_result);
409-
410408
// Check if the unwind impacts the fcs safe head.
411409
if let Some(block_info) = unwind_result.l2_safe_block_info {
412410
// If the safe head was unwound and is above or equal to the finalized head,

crates/database/db/src/operations.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,6 @@ impl<T: WriteConnectionProvider + ?Sized + Sync> DatabaseWriteOperations for T {
852852
// delete batch commits, l1 messages and batch finalization effects greater than the
853853
// provided l1 block number
854854
let batches_removed = self.delete_batches_gt_block_number(l1_block_number).await?;
855-
println!("Deleted {} batches", batches_removed);
856855
let deleted_messages = self.delete_l1_messages_gt(l1_block_number).await?;
857856
self.delete_batch_finalization_gt_block_number(l1_block_number).await?;
858857
let batch_reverts_removed: u64 =

crates/node/src/test_utils/l1_helpers.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ pub struct BatchCommitBuilder<'a> {
248248
block_info: BlockInfo,
249249
hash: B256,
250250
index: u64,
251-
block_number: u64,
252251
block_timestamp: u64,
253252
calldata: Option<Bytes>,
254253
calldata_path: Option<String>,
@@ -262,7 +261,6 @@ impl<'a> BatchCommitBuilder<'a> {
262261
block_info: BlockInfo { number: 0, hash: B256::random() },
263262
hash: B256::random(),
264263
index: 0,
265-
block_number: 0,
266264
block_timestamp: 0,
267265
calldata: None,
268266
calldata_path: None,
@@ -276,12 +274,6 @@ impl<'a> BatchCommitBuilder<'a> {
276274
self
277275
}
278276

279-
/// Set the L1 block number for this batch commit.
280-
pub const fn at_block_number(mut self, block_number: u64) -> Self {
281-
self.block_info.number = block_number;
282-
self
283-
}
284-
285277
/// Set the batch hash.
286278
pub const fn hash(mut self, hash: B256) -> Self {
287279
self.hash = hash;
@@ -294,12 +286,6 @@ impl<'a> BatchCommitBuilder<'a> {
294286
self
295287
}
296288

297-
/// Set the batch block number.
298-
pub const fn block_number(mut self, block_number: u64) -> Self {
299-
self.block_number = block_number;
300-
self
301-
}
302-
303289
/// Set the batch block timestamp.
304290
pub const fn block_timestamp(mut self, timestamp: u64) -> Self {
305291
self.block_timestamp = timestamp;
@@ -337,7 +323,7 @@ impl<'a> BatchCommitBuilder<'a> {
337323
let batch_data = BatchCommitData {
338324
hash: self.hash,
339325
index: self.index,
340-
block_number: self.block_number,
326+
block_number: self.block_info.number,
341327
block_timestamp: self.block_timestamp,
342328
calldata: Arc::new(raw_calldata),
343329
blob_versioned_hash: self.blob_versioned_hash,

crates/node/tests/e2e.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -765,8 +765,6 @@ async fn shutdown_consolidates_most_recent_batch_on_startup() -> eyre::Result<()
765765
// Request an event stream from the rollup node manager.
766766
let mut rnm_events = handle.get_event_listener().await?;
767767

768-
println!("im here");
769-
770768
// Send the second batch again to mimic the watcher behaviour.
771769
let block_1_info = BlockInfo { number: 18318215, hash: B256::random() };
772770
l1_notification_tx
@@ -1052,6 +1050,7 @@ async fn can_revert_to_l1_block() -> eyre::Result<()> {
10521050

10531051
// Validate the safe block number is 57
10541052
assert_eq!(status.l2.fcs.safe_block_info().number, 57);
1053+
assert_eq!(status.l1.status, SyncMode::Synced);
10551054

10561055
Ok(())
10571056
}
@@ -1185,7 +1184,7 @@ async fn can_handle_batch_revert_with_reorg() -> eyre::Result<()> {
11851184
.at_block(batch_0_block_info)
11861185
.hash(batch_0_hash)
11871186
.index(1)
1188-
.block_number(18318207)
1187+
.at_block(batch_0_block_info)
11891188
.block_timestamp(1696935971)
11901189
.calldata(raw_calldata_0)
11911190
.send()
@@ -1201,7 +1200,7 @@ async fn can_handle_batch_revert_with_reorg() -> eyre::Result<()> {
12011200
.at_block(batch_1_block_info)
12021201
.hash(batch_1_hash)
12031202
.index(2)
1204-
.block_number(18318215)
1203+
.at_block(batch_1_block_info)
12051204
.block_timestamp(1696936000)
12061205
.calldata(raw_calldata_1)
12071206
.send()

0 commit comments

Comments
 (0)