func (node *BlockNode) GetAncestorAtHeight(height uint64) *BlockNode {
	if node.Height < height {
		return nil
	}

	current := node

	// go up to the slot after the slot we're searching for
	for height < current.Height {
		current = current.Parent
	}
	return current
}
// GetAncestorAtHeight gets the ancestor of a block at a certain height.
GetAncestorAtHeight gets the ancestor of a block at a certain height.
// GetAncestorAtHeight gets the ancestor of a block at a certain height .
func (node *BlockNode) GetAncestorAtHeight(height uint64) *BlockNode {
	if node.Height < height {
		return nil
	}
	current := node
	for height < current.Height {
		current = current.Parent
	}
	return current
}
func ( node * BlockNode ) GetAncestorAtHeight ( height uint64 ) * BlockNode { if node . Height < height { return nil } current := node for height < current . Height { current = current . Parent } return current }
GetAncestorAtHeight gets the ancestor of a block at a certain height.
GetAncestorAtHeight gets the ancestor of a block at a certain height .
// go up to the slot after the slot we're searching for