eth-iterator-utils/fixture/chaindata.go
Roy Crihfield 6bb6d4e27f Add tracker package, update and clean up
* pull changes from geth fork

* update deps

* remove unused: StartPath, SubtrieIteratorFactory

* change module name
2023-08-03 19:59:33 +08:00

24 lines
424 B
Go

package fixture
import (
"os"
"path/filepath"
"runtime"
)
var (
ChainDataPath, AncientDataPath string
)
func init() {
_, path, _, _ := runtime.Caller(0)
wd := filepath.Dir(path)
ChainDataPath = filepath.Join(wd, "..", "fixture", "chaindata")
AncientDataPath = filepath.Join(ChainDataPath, "ancient")
if _, err := os.Stat(ChainDataPath); err != nil {
panic("must populate chaindata at " + ChainDataPath)
}
}