mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-24 20:47:16 +00:00
24 lines
484 B
Go
24 lines
484 B
Go
|
package main
|
||
|
|
||
|
import "github.com/spf13/cobra"
|
||
|
|
||
|
var (
|
||
|
chaindata string
|
||
|
blocksPerStep uint64
|
||
|
)
|
||
|
|
||
|
func must(err error) {
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func withChaindata(cmd *cobra.Command) {
|
||
|
cmd.Flags().StringVar(&chaindata, "chaindata", "chaindata", "path to the db")
|
||
|
must(cmd.MarkFlagFilename("chaindata", ""))
|
||
|
}
|
||
|
|
||
|
func withBlocksPerStep(cmd *cobra.Command) {
|
||
|
cmd.Flags().Uint64Var(&blocksPerStep, "blocks_per_step", 2, "how much blocks unwind/exec on each iteration")
|
||
|
}
|