From 177c86ef833680caf29227d95673118966c4add5 Mon Sep 17 00:00:00 2001 From: Tinu280 Date: Wed, 19 Nov 2025 15:21:41 +0700 Subject: [PATCH] rawdb: replace tablewriter usage with manual formatted output --- core/rawdb/database.go | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/core/rawdb/database.go b/core/rawdb/database.go index 131e370650..c26a6b4f18 100644 --- a/core/rawdb/database.go +++ b/core/rawdb/database.go @@ -650,11 +650,21 @@ func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error { total.Add(uint64(ancient.size())) } - table := NewTableWriter(os.Stdout) - table.SetHeader([]string{"Database", "Category", "Size", "Items"}) - table.SetFooter([]string{"", "Total", common.StorageSize(total.Load()).String(), fmt.Sprintf("%d", count.Load())}) - table.AppendBulk(stats) - table.Render() +// Print header +fmt.Println("Database\tCategory\tSize\tItems") + +// Print table rows (stats is [][]string) +for _, row := range stats { + if len(row) == 4 { + fmt.Printf("%s\t%s\t%s\t%s\n", row[0], row[1], row[2], row[3]) + } +} + +// Print footer summary +fmt.Printf("\nTotal\t\t%s\t%d\n", + common.StorageSize(total.Load()).String(), + count.Load(), +) if !unaccounted.empty() { log.Error("Database contains unaccounted data", "size", unaccounted.sizeString(), "count", unaccounted.countString())