diff --git a/daemon/processing/block.go b/daemon/processing/block.go index bfa19f9..5c50bdf 100644 --- a/daemon/processing/block.go +++ b/daemon/processing/block.go @@ -312,7 +312,7 @@ func checkHandleReorg(height uint64, chainPrevHash string) (uint64, error) { return height, errors.Prefix("error getting block@"+strconv.Itoa(int(prevHeight))+": ", err) } //Recursively delete blocks until they match or a reorg of depth 100 == failure of logic. - for prevBlock.Hash != chainPrevHash && depth < 100 { + for prevBlock.Hash != chainPrevHash && depth < 100 && prevHeight > 0 { // Delete because it needs to be reprocessed due to reorg logrus.Println("block ", prevBlock.Hash, " at height ", prevBlock.Height, " to be removed due to reorg. TX-> ", prevBlock.TransactionHashes)