Skip to content

Commit

Permalink
cmd/genesis-gen: fix null balance value (#24)
Browse files Browse the repository at this point in the history
### Description

`GenesisAccount.balance` cannot be `nil`
  • Loading branch information
0xcb9ff9 authored Sep 3, 2023
1 parent c16b360 commit 51ed537
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/genesis-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ func genesisGen(c *cli.Context) error {
return fmt.Errorf("failed to parse amount %s: %w", val, err)
}

if amount == nil {
amount = big.NewInt(0)
}

genesis.Alloc[addr] = core.GenesisAccount{
Balance: amount,
}
Expand Down

0 comments on commit 51ed537

Please sign in to comment.