Skip to content

Commit

Permalink
add holesky
Browse files Browse the repository at this point in the history
  • Loading branch information
angaz committed Oct 7, 2023
1 parent 17086ce commit 29151f8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
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,

Check failure on line 57 in cmd/crawler/crawlercmd.go

View workflow job for this annotation

GitHub Actions / lint

undefined: utils.HoleskyFlag (typecheck)
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),

Check failure on line 123 in cmd/crawler/crawlercmd.go

View workflow job for this annotation

GitHub Actions / lint

undefined: utils.HoleskyFlag (typecheck)
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()

Check failure on line 363 in pkg/crawler/crawl.go

View workflow job for this annotation

GitHub Actions / lint

undefined: core.DefaultHoleskyGenesisBlock (typecheck)

Check failure on line 363 in pkg/crawler/crawl.go

View workflow job for this annotation

GitHub Actions / lint

undefined: core.DefaultHoleskyGenesisBlock) (typecheck)
}

return core.DefaultGenesisBlock()
}

0 comments on commit 29151f8

Please sign in to comment.