From ff284d5d5ca680499b89d60913f54e450d405fff Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 18 Nov 2022 16:11:10 +0300 Subject: [PATCH] core: remove genesis-specific header hash logic from init The code below will do the same thing (via CreateGenesisBlock, but it doesn't matter) generically, so this branch is useless. --- pkg/core/blockchain.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index 8b6ab5049..d7b06cf6f 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -425,9 +425,6 @@ func (bc *Blockchain) init() error { if err != nil { return fmt.Errorf("failed to retrieve current header info: %w", err) } - if bc.storedHeaderCount == 0 && currHeaderHeight == 0 { - bc.headerHashes = append(bc.headerHashes, currHeaderHash) - } // There is a high chance that the Node is stopped before the next // batch of 2000 headers was stored. Via the currentHeaders stored we can sync