diff --git a/tools/genesis-snapshot/main.go b/tools/genesis-snapshot/main.go index 63d303a83..05728937e 100644 --- a/tools/genesis-snapshot/main.go +++ b/tools/genesis-snapshot/main.go @@ -37,7 +37,7 @@ func main() { func parseFlags() (opt []options.Option[snapshotcreator.Options], conf string) { filename := flag.String("filename", "", "the name of the generated snapshot file") config := flag.String("config", "", "use ready config: devnet, feature, docker") - genesisSeedStr := flag.String("seed", "", "the genesis seed provided in base58 format.") + genesisSeedStr := flag.String("seed", "7R1itJx5hVuo9w9hjg5cwKFmek4HMSoBDgJZN8hKGxih", "the genesis seed provided in base58 format.") flag.Parse() opt = []options.Option[snapshotcreator.Options]{} @@ -45,14 +45,12 @@ func parseFlags() (opt []options.Option[snapshotcreator.Options], conf string) { opt = append(opt, snapshotcreator.WithFilePath(*filename)) } - if *genesisSeedStr != "" { - genesisSeed, err := base58.Decode(*genesisSeedStr) - if err != nil { - log.Fatal(ierrors.Errorf("failed to decode base58 seed, using the default one: %w", err)) - } - keyManager := mock.NewKeyManager(genesisSeed[:], 0) - opt = append(opt, snapshotcreator.WithGenesisKeyManager(keyManager)) + genesisSeed, err := base58.Decode(*genesisSeedStr) + if err != nil { + log.Fatal(ierrors.Wrap(err, "failed to decode base58 seed")) } + keyManager := mock.NewKeyManager(genesisSeed[:], 0) + opt = append(opt, snapshotcreator.WithGenesisKeyManager(keyManager)) return opt, *config }