From b62e0348e0ea505ae14c654de83af530db2f154f Mon Sep 17 00:00:00 2001 From: MozirDmitriy Date: Sat, 20 Sep 2025 02:23:50 +0300 Subject: [PATCH] =?UTF-8?q?core/rawdb:=20fix=20bad=20blocks=20sorted=20fai?= =?UTF-8?q?lure=20message=20to=20map=20index=E2=86=92number=20correctly=20?= =?UTF-8?q?(#32627)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- core/rawdb/accessors_chain_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/rawdb/accessors_chain_test.go b/core/rawdb/accessors_chain_test.go index 5ed65b69b5..819788b4da 100644 --- a/core/rawdb/accessors_chain_test.go +++ b/core/rawdb/accessors_chain_test.go @@ -246,7 +246,7 @@ func TestBadBlockStorage(t *testing.T) { } for i := 0; i < len(badBlocks)-1; i++ { 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()) } }