@@ -166,13 +166,10 @@ pub async fn setup_engine_with_chain_import(
166
166
result. is_complete( )
167
167
) ;
168
168
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 {
173
170
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
176
173
) ;
177
174
return Err ( eyre:: eyre!( "Chain import block count mismatch for node {}" , idx) ) ;
178
175
}
@@ -351,7 +348,7 @@ mod tests {
351
348
. unwrap ( ) ;
352
349
353
350
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 ) ;
355
352
356
353
// Verify stage checkpoints exist
357
354
let provider = provider_factory. database_provider_ro ( ) . unwrap ( ) ;
@@ -508,7 +505,7 @@ mod tests {
508
505
509
506
// Verify the import was successful
510
507
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 ) ;
512
509
assert_eq ! ( result. total_decoded_txns, 0 ) ;
513
510
assert_eq ! ( result. total_imported_txns, 0 ) ;
514
511
0 commit comments