Skip to content

Commit f3a57a2

Browse files
tmelhaotmelhao
authored andcommitted
fix test
Signed-off-by: tmelhao <[email protected]>
1 parent 9c34e8c commit f3a57a2

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

crates/e2e-test-utils/src/setup_import.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,10 @@ pub async fn setup_engine_with_chain_import(
166166
result.is_complete()
167167
);
168168

169-
// The import counts genesis block in total_imported_blocks, so we expect
170-
// total_imported_blocks to be total_decoded_blocks + 1
171-
let expected_imported = result.total_decoded_blocks + 1; // +1 for genesis
172-
if result.total_imported_blocks != expected_imported {
169+
if result.total_decoded_blocks != result.total_imported_blocks {
173170
debug!(target: "e2e::import",
174-
"Import block count mismatch: expected {} (decoded {} + genesis), got {}",
175-
expected_imported, result.total_decoded_blocks, result.total_imported_blocks
171+
"Import block count mismatch: decoded {} != imported {}",
172+
result.total_decoded_blocks, result.total_imported_blocks
176173
);
177174
return Err(eyre::eyre!("Chain import block count mismatch for node {}", idx));
178175
}
@@ -351,7 +348,7 @@ mod tests {
351348
.unwrap();
352349

353350
assert_eq!(result.total_decoded_blocks, 5);
354-
assert_eq!(result.total_imported_blocks, 6); // +1 for genesis
351+
assert_eq!(result.total_imported_blocks, 5);
355352

356353
// Verify stage checkpoints exist
357354
let provider = provider_factory.database_provider_ro().unwrap();
@@ -508,7 +505,7 @@ mod tests {
508505

509506
// Verify the import was successful
510507
assert_eq!(result.total_decoded_blocks, 10);
511-
assert_eq!(result.total_imported_blocks, 11); // +1 for genesis
508+
assert_eq!(result.total_imported_blocks, 10);
512509
assert_eq!(result.total_decoded_txns, 0);
513510
assert_eq!(result.total_imported_txns, 0);
514511

0 commit comments

Comments
 (0)