lib/storage: dump incorrectly sorted items on a single line; this should simplify error reporting

This commit is contained in:
Aliaksandr Valialkin 2019-11-05 18:41:50 +02:00
parent 2ef5082ead
commit c6564c5d26

View File

@ -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
}