Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd, rawdb: Fix db inspect command when overwriting the tail method in chainfreezer. #627

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions core/rawdb/ancient_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/log"
)

type tableSize struct {
Expand Down Expand Up @@ -89,6 +90,10 @@ func inspectFreezers(db ethdb.Database) ([]freezerInfo, error) {
infos = append(infos, info)

case stateFreezerName:
if ReadStateScheme(db) != PathScheme {
log.Info("Skip inspecting state freezer", "reason", "state freezer is supported for PathScheme only")
continue
}
datadir, err := db.AncientDatadir()
if err != nil {
return nil, err
Expand Down
5 changes: 0 additions & 5 deletions core/rawdb/chain_freezer.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ func (f *chainFreezer) Close() error {
return err
}

// Tail returns an error as we don't have a backing chain freezer.
func (f *chainFreezer) Tail() (uint64, error) {
return 0, errNotSupported
}

// freeze is a background thread that periodically checks the blockchain for any
// import progress and moves ancient data from the fast database into the freezer.
//
Expand Down
Loading