makedag command¶
| Source (upstream pre-purge) | Current | |
|---|---|---|
| File | cmd/geth/misccmd.go |
misccmd_pow.go |
| Symbol | makedag |
makedag |
| Ref | dde2da0ef~1 |
etc/v1.17.3-full-node |
Generates ethash mining DAG to disk for testing. Moved to misccmd_pow.go to keep misccmd.go identical to upstream. Adapted from pre-purge3 with --epoch.length flag from core-geth (ECIP-1099 support).
3-way merge — purge → getc ← upstream¶
pre-purgecore-geth
↗// makedag generates an ethash mining DAG into the provided folder.
func makedag(ctx *cli.Context) error {
args := ctx.Args().Slice()
if len(args) != 2 {
utils.Fatalf(`Usage: geth makedag <block number> <outputdir>`)
}
block, err := strconv.ParseUint(args[0], 0, 64)
if err != nil {
utils.Fatalf("Invalid block number: %v", err)
}
↗ epochLength := ctx.Uint64(utils.EthashEpochLengthFlag.Name)
↗ ethash.MakeDataset(block, epochLength, args[1])
↗ return nil
}