-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
go run ./cmd/downloader torrent_create --datadir=/Users/alex.sharov/data/sepolia34 --chain=sepolia --pprof
because of
fmt.Printf("%s, %t\n", s, Enums.Bodies.Type())
bodies, %!t(<nil>)
because of core/snaptype is not imported
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1080921b2]
goroutine 1 [running]:
github.com/ledgerwatch/erigon-lib/chain/snapcfg.Cfg.Seedable({0x0, {0x0, 0x0, 0x0}, {0x7ff7b848b6ea, 0x7}}, {0x1, 0x0, 0x7a120, {0xc0000ec61c, ...}, ...})
github.com/ledgerwatch/erigon-lib@v1.0.0/chain/snapcfg/util.go:283 +0x52
github.com/ledgerwatch/erigon-lib/chain/snapcfg.Seedable({0x7ff7b848b6ea?, 0xc0004402f8?}, {0x1, 0x0, 0x7a120, {0xc0000ec61c, 0x1b}, {0xc000aa84b0, 0x47}, {0xc0000ec633, ...}, ...})
github.com/ledgerwatch/erigon-lib@v1.0.0/chain/snapcfg/util.go:350 +0xc5
github.com/ledgerwatch/erigon-lib/downloader.seedableSegmentFiles({0xc000ce6cf0, 0x2b}, {0x7ff7b848b6ea, 0x7})
github.com/ledgerwatch/erigon-lib@v1.0.0/downloader/util.go:93 +0x272
github.com/ledgerwatch/erigon-lib/downloader.SeedableFiles({{0x7ff7b848b6c0, 0x21}, {0x7ff7b848b6c0, 0x21}, {0xc000ce6c90, 0x2b}, {0xc000ce6cc0, 0x26}, {0xc000ce6cf0, 0x2b}, ...}, ...)
github.com/ledgerwatch/erigon-lib@v1.0.0/downloader/downloader.go:2406 +0x45
github.com/ledgerwatch/erigon-lib/downloader.BuildTorrentFilesIfNeed({0x108e26990, 0xc00097a460}, {{0x7ff7b848b6c0, 0x21}, {0x7ff7b848b6c0, 0x21}, {0xc000ce6c90, 0x2b}, {0xc000ce6cc0, 0x26}, ...}, ...)
github.com/ledgerwatch/erigon-lib@v1.0.0/downloader/util.go:170 +0x1c8
main.init.func4(0x109715360, {0x10871dd33?, 0x4?, 0x10871dd37?})
github.com/ledgerwatch/erigon/cmd/downloader/main.go:282 +0x13b
github.com/spf13/cobra.(*Command).execute(0x109715360, {0xc0000c8300, 0x3, 0x3})
github.com/spf13/cobra@v1.8.0/command.go:983 +0xaca
github.com/spf13/cobra.(*Command).ExecuteC(0x109715080)
github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/spf13/cobra.(*Command).ExecuteContext(...)
github.com/spf13/cobra@v1.8.0/command.go:1032
main.main()
github.com/ledgerwatch/erigon/cmd/downloader/main.go:54 +0x69
please make it compile-time impossible to not import this package
please add unit-test for it