From c6564c5d26d3bf456ae306c1426f9bb510df1e69 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 5 Nov 2019 18:41:50 +0200 Subject: [PATCH] lib/storage: dump incorrectly sorted items on a single line; this should simplify error reporting --- lib/storage/index_db.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/storage/index_db.go b/lib/storage/index_db.go index 33b795e260..f2ce062a2b 100644 --- a/lib/storage/index_db.go +++ b/lib/storage/index_db.go @@ -2412,7 +2412,7 @@ func checkItemsSorted(items [][]byte) error { prevItem := items[0] for _, currItem := range items[1:] { if string(prevItem) > string(currItem) { - return fmt.Errorf("items aren't sorted: prevItem > currItem\nprevItem=%X\ncurrItem=%X\nitems=%X", prevItem, currItem, items) + return fmt.Errorf("items aren't sorted: prevItem > currItem; prevItem=%X; currItem=%X; items=%X", prevItem, currItem, items) } prevItem = currItem }