Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshihitoAso committed Mar 14, 2024
1 parent 65b3653 commit 09bc0b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/geth/chaincmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 09bc0b7

Please sign in to comment.