Skip to content
Open
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
2 changes: 2 additions & 0 deletions cmd/crawler/crawlercmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ var (
&timeoutFlag,
&workersFlag,
utils.GoerliFlag,
utils.HoleskyFlag,
utils.NetworkIdFlag,
utils.SepoliaFlag,
},
Expand Down Expand Up @@ -119,6 +120,7 @@ func crawlNodes(ctx *cli.Context) error {
Workers: ctx.Uint64(workersFlag.Name),
Sepolia: ctx.Bool(utils.SepoliaFlag.Name),
Goerli: ctx.Bool(utils.GoerliFlag.Name),
Holesky: ctx.Bool(utils.HoleskyFlag.Name),
NodeDB: nodeDB,
}

Expand Down
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
network = {
type = types.str;
default = "mainnet";
example = "goerli";
example = "holesky";
description = "Name of the network to crawl. Defaults to Mainnet.";
};
};
Expand All @@ -209,6 +209,7 @@
"--geoipdb=${cfg.crawler.geoipdb}"
]
++ optional (cfg.crawler.network == "goerli") "--goerli"
++ optional (cfg.crawler.network == "holesky") "--holesky"
++ optional (cfg.crawler.network == "sepolia") "--sepolia";
in
"${pkgs.nodeCrawler}/bin/crawler crawl ${concatStringsSep " " args}";
Expand Down
4 changes: 4 additions & 0 deletions pkg/crawler/crawl.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type Crawler struct {
Workers uint64
Sepolia bool
Goerli bool
Holesky bool

NodeDB *enode.DB
}
Expand Down Expand Up @@ -358,6 +359,9 @@ func (c Crawler) makeGenesis() *core.Genesis {
if c.Goerli {
return core.DefaultGoerliGenesisBlock()
}
if c.Holesky {
return core.DefaultHoleskyGenesisBlock()
}

return core.DefaultGenesisBlock()
}