ethdb, internal/ethapi: support exposing Pebble stats too, beside LevelDB (#28224)

ethdb, internal/ethapi: support exposing Pebble stats too, besinde LevelDB
This commit is contained in:
Péter Szilágyi
2023-09-28 22:27:21 +03:00
committed by GitHub
parent b9450bfcca
commit f988b2332e
3 changed files with 11 additions and 7 deletions
-5
View File
@@ -2191,11 +2191,6 @@ func (api *DebugAPI) PrintBlock(ctx context.Context, number uint64) (string, err
// ChaindbProperty returns leveldb properties of the key-value database.
func (api *DebugAPI) ChaindbProperty(property string) (string, error) {
if property == "" {
property = "leveldb.stats"
} else if !strings.HasPrefix(property, "leveldb.") {
property = "leveldb." + property
}
return api.b.ChainDb().Stat(property)
}