Commit graph

4 commits

Author SHA1 Message Date
rodrigo
f19cd58957
feat(rawdb): skip freezers (#220)
## Why this should be merged

As described in https://github.com/ava-labs/coreth/issues/1137, database
inspection of a Coreth chain database fails because `InspectDatabase()`
expects for freezers to be used. This PR fixes this bug by adding an
option to skip freezer inspection.

This PR should be followed with a downstream PR in Coreth to pass in an
option to skip freezer inspection during database inspection.

## How this works

Extends `inspectDatabaseConfig` with a `skipFreezers` field and adds the
associated option function for it.

## How this was tested

CI + ran `InspectDatabase()` against Coreth locally
2025-09-03 14:50:44 +01:00
Arran Schlosberg
c78db425b8
doc(core/rawdb): fix outdated comment (#134)
Missed in earlier PR:
https://github.com/ava-labs/libevm/pull/132#discussion_r1952593121

Signed-off-by: Arran Schlosberg <519948+ARR4N@users.noreply.github.com>
2025-02-12 17:41:41 +00:00
Quentin McGaw
0c905680f3
chore(core/rawdb): InspectDatabase can receive multiple times the same option (#132) 2025-02-12 12:55:40 +00:00
Arran Schlosberg
c74b645360
feat: rawdb.InspectDatabaseOption (#111)
## Why this should be merged

Allows for `ava-labs/coreth` equivalent modifications of
`rawdb.InspectDatabase()` through external logic injection.

## How this works

Variadic options to:

1. Record a database statistic;
2. Mark a database statistic as metadata;
3. Filter statistics for printing.

## How this was tested

Testable example acting as a unit test.

---------

Signed-off-by: Arran Schlosberg <519948+ARR4N@users.noreply.github.com>
Co-authored-by: Quentin McGaw <quentin.mcgaw@avalabs.org>
2025-02-07 17:32:51 +00:00