Skip to content

Commit b62e034

Browse files
authored
core/rawdb: fix bad blocks sorted failure message to map index→number correctly (ethereum#32627)
Fix the t.Fatalf format arguments in TestBadBlockStorage to match the intended #index output. Previously, the left number used i+1 and the right index used the block number, producing misleading diagnostics. Correct mapping improves test failure clarity and debuggability.
1 parent f770ec1 commit b62e034

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/rawdb/accessors_chain_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ func TestBadBlockStorage(t *testing.T) {
246246
}
247247
for i := 0; i < len(badBlocks)-1; i++ {
248248
if badBlocks[i].NumberU64() < badBlocks[i+1].NumberU64() {
249-
t.Fatalf("The bad blocks are not sorted #[%d](%d) < #[%d](%d)", i, i+1, badBlocks[i].NumberU64(), badBlocks[i+1].NumberU64())
249+
t.Fatalf("The bad blocks are not sorted #[%d](%d) < #[%d](%d)", i, badBlocks[i].NumberU64(), i+1, badBlocks[i+1].NumberU64())
250250
}
251251
}
252252

0 commit comments

Comments
 (0)