mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 13:07:17 +00:00
Downloader: don't setup erigon's config if --dowloader.api.addr is set (#3480)
This commit is contained in:
parent
f66f937d4d
commit
dcabe33f33
@ -1362,18 +1362,14 @@ func SetEthConfig(ctx *cli.Context, nodeConfig *node.Config, cfg *ethconfig.Conf
|
||||
torrentPort = ctx.GlobalInt(TorrentPortFlag.Name)
|
||||
}
|
||||
|
||||
TorrentPortFlag = cli.IntFlag{
|
||||
Name: "torrent.port",
|
||||
Value: 42069,
|
||||
Usage: "port to listen and serve BitTorrent protocol",
|
||||
}
|
||||
|
||||
if cfg.Snapshot.Enabled && !ctx.GlobalIsSet(DownloaderAddrFlag.Name) {
|
||||
torrentCfg, pieceCompletion, err := torrentcfg.New(cfg.SnapshotDir, torrentVerbosity, downloadRate, uploadRate, torrentPort)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
cfg.Torrent = torrentCfg
|
||||
cfg.TorrentPieceCompletionStorage = pieceCompletion
|
||||
}
|
||||
|
||||
if ctx.Command.Name == "import" {
|
||||
cfg.ImportMode = true
|
||||
|
Loading…
Reference in New Issue
Block a user