From 0298c75b7ba9980c614d622d8a3ca5eeebad7bce Mon Sep 17 00:00:00 2001 From: Dusan Date: Thu, 13 Jul 2023 10:01:11 +0200 Subject: [PATCH] Delete unnecessary if --- command/genesis/params.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/command/genesis/params.go b/command/genesis/params.go index d83ea31475..4b016b0b0a 100644 --- a/command/genesis/params.go +++ b/command/genesis/params.go @@ -500,8 +500,6 @@ 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 @@ -509,11 +507,7 @@ func (p *genesisParams) validatePremineInfo() error { } } - if !isReserveAccPremined { - return errReserveAccMustBePremined - } - - return nil + return errReserveAccMustBePremined } // validateBurnContract validates burn contract. If native token is mintable,