Skip to content

Commit

Permalink
check for non empty genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
sukantoraymond committed Jun 5, 2024
1 parent a726180 commit 7922de2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions subnet/subnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ func New(client *avalanche.BaseApp, subnetParams *SubnetParams) (*Subnet, error)
if subnetParams.SubnetEVM == nil && subnetParams.CustomVM != nil {
return nil, fmt.Errorf("SubnetEVM params and CustomVM params cannot both be non-empty")
}
if subnetParams.SubnetEVM != nil && subnetParams.SubnetEVM.GenesisParams == nil {
return nil, fmt.Errorf("SubnetEVM Genesis params cannot be empty")
}
var genesisBytes []byte
var err error
switch {
Expand Down

0 comments on commit 7922de2

Please sign in to comment.