diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go index d17c8e923..b63359e95 100644 --- a/cmd/geth/chaincmd.go +++ b/cmd/geth/chaincmd.go @@ -222,10 +222,6 @@ func getIsQuorum(file io.Reader) bool { // updateTransitions will update genesis block with the new transitions data func updateTransitions(ctx *cli.Context) error { - // Open and initialise both full and light databases - stack, _ := makeConfigNode(ctx) - defer stack.Close() - // Make sure we have a valid genesis JSON genesisPath := ctx.Args().First() if len(genesisPath) == 0 { @@ -254,6 +250,10 @@ func updateTransitions(ctx *cli.Context) error { return fmt.Errorf("update transitions only apply to quorum configuration") } + // Open and initialise both full and light databases + stack, _ := makeConfigNode(ctx) + defer stack.Close() + // Update transitions and recommit to db for _, name := range []string{"chaindata", "lightchaindata"} { chaindb, err := stack.OpenDatabase(name, 0, 0, "", false)