mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 12:46:44 +00:00
core/rawdb: fix bad blocks sorted failure message to map index→number correctly (#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.
This commit is contained in:
parent
18bb7b45c8
commit
1c3e5fd1f0
1 changed files with 1 additions and 1 deletions
|
|
@ -246,7 +246,7 @@ func TestBadBlockStorage(t *testing.T) {
|
||||||
}
|
}
|
||||||
for i := 0; i < len(badBlocks)-1; i++ {
|
for i := 0; i < len(badBlocks)-1; i++ {
|
||||||
if badBlocks[i].NumberU64() < badBlocks[i+1].NumberU64() {
|
if badBlocks[i].NumberU64() < badBlocks[i+1].NumberU64() {
|
||||||
t.Fatalf("The bad blocks are not sorted #[%d](%d) < #[%d](%d)", i, i+1, badBlocks[i].NumberU64(), badBlocks[i+1].NumberU64())
|
t.Fatalf("The bad blocks are not sorted #[%d](%d) < #[%d](%d)", i, badBlocks[i].NumberU64(), i+1, badBlocks[i+1].NumberU64())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue