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.
This commit is contained in:
Roman Khimov 2022-11-18 16:11:10 +03:00
parent a43a87675d
commit ff284d5d5c

View file

@ -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