Skip to content

Commit 67a9d12

Browse files
committed
Remove unused stat and counter types
1 parent e9c0eea commit 67a9d12

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

core/rawdb/database.go

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -241,36 +241,6 @@ func Open(o OpenOptions) (ethdb.Database, error) {
241241
return kvdb, nil
242242
}
243243

244-
type counter uint64
245-
246-
func (c counter) String() string {
247-
return fmt.Sprintf("%d", c)
248-
}
249-
250-
func (c counter) Percentage(current uint64) string {
251-
return fmt.Sprintf("%d", current*100/uint64(c))
252-
}
253-
254-
// stat stores sizes and count for a parameter
255-
type stat struct {
256-
size common.StorageSize
257-
count counter
258-
}
259-
260-
// Add size to the stat and increase the counter by 1
261-
func (s *stat) Add(size common.StorageSize) {
262-
s.size += size
263-
s.count++
264-
}
265-
266-
func (s *stat) Size() string {
267-
return s.size.String()
268-
}
269-
270-
func (s *stat) Count() string {
271-
return s.count.String()
272-
}
273-
274244
// InspectDatabase traverses the entire database and checks the size
275245
// of all different categories of data.
276246
func InspectDatabase(db ethdb.Database, keyPrefix, keyStart []byte) error {

0 commit comments

Comments
 (0)