[NOD-162] Fixed calculateNodeHeight not handling the genesis block. (#291)

This commit is contained in:
stasatdaglabs 2019-05-07 14:36:27 +03:00 committed by Svarog
parent 39ccc4b225
commit 42109ec4d5

View File

@ -142,6 +142,9 @@ func initBlockNode(node *blockNode, blockHeader *wire.BlockHeader, parents block
}
func calculateNodeHeight(node *blockNode) uint64 {
if node.isGenesis() {
return 0
}
return node.parents.maxHeight() + 1
}