Skip to content

Commit

Permalink
Merge pull request #34 from s1na/fix/geth-init
Browse files Browse the repository at this point in the history
client: fix geth init state scheme
  • Loading branch information
lightclient authored Apr 8, 2024
2 parents fb24222 + e09864b commit 0b8864f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ func newGethClient(ctx context.Context, geth string, chaindir string, verbose bo
datadir = fmt.Sprintf("--datadir=%s", tmp)
gcmode = "--gcmode=archive"
loglevel = fmt.Sprintf("--verbosity=%d", args.logLevelInt)
// Archive mode requires hash-based scheme.
scheme = fmt.Sprintf("--state.scheme=%s", "hash")
)

// Run geth init.
options := []string{datadir, gcmode, loglevel, "init", filepath.Join(chaindir, "genesis.json")}
options := []string{datadir, gcmode, scheme, loglevel, "init", filepath.Join(chaindir, "genesis.json")}
err = runCmd(ctx, geth, verbose, options...)
if err != nil {
return nil, err
Expand Down

0 comments on commit 0b8864f

Please sign in to comment.