Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

validatePremineInfo-delete-unnecessary-if #1719

Merged
merged 1 commit into from
Jul 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions command/genesis/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,20 +500,14 @@ func (p *genesisParams) parsePremineInfo() error {

// validatePremineInfo validates whether reserve account (0x0 address) is premined
func (p *genesisParams) validatePremineInfo() error {
isReserveAccPremined := false

for _, premineInfo := range p.premineInfos {
if premineInfo.address == types.ZeroAddress {
// we have premine of zero address, just return
return nil
}
}

if !isReserveAccPremined {
return errReserveAccMustBePremined
}

return nil
return errReserveAccMustBePremined
}

// validateBurnContract validates burn contract. If native token is mintable,
Expand Down