Skip to content
This repository has been archived by the owner on Feb 18, 2025. It is now read-only.

Commit

Permalink
cmd,rawdb: avoid extend Tail method in chainfreezer which make db ins…
Browse files Browse the repository at this point in the history
…pect failed in chain freezer (#627)
  • Loading branch information
huyngopt1994 committed Feb 17, 2025
1 parent 147b946 commit b43ad9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

0 comments on commit b43ad9b

Please sign in to comment.