forked from TrueCloudLab/neoneo-go
core: fix blockchain init with (2000*N + 1) header hashes in DB
Stored header count includes block number zero, so it's (height + 1).
This commit is contained in:
parent
2dfeb55d4c
commit
2c0ed62680
1 changed files with 1 additions and 1 deletions
|
@ -150,7 +150,7 @@ func (bc *Blockchain) init() error {
|
|||
// 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
|
||||
// that with stored blocks.
|
||||
if currHeaderHeight > bc.storedHeaderCount {
|
||||
if currHeaderHeight >= bc.storedHeaderCount {
|
||||
hash := currHeaderHash
|
||||
var targetHash util.Uint256
|
||||
if bc.headerList.Len() > 0 {
|
||||
|
|
Loading…
Reference in a new issue