func (node *ShardBlockNode) GetAncestorAtSlot(slot uint64) *ShardBlockNode {
	if node.Slot < slot {
		return nil
	}

	current := node

	for current != nil && slot < current.Slot {
		current = current.Parent
	}

	return current
}
// GetAncestorAtSlot gets the first block node that occurred at or before a certain slot.
GetAncestorAtSlot gets the first block node that occurred at or before a certain slot.
// GetAncestorAtSlot gets the first block node that occurred at or before a certain slot .
func (node *ShardBlockNode) GetAncestorAtSlot(slot uint64) *ShardBlockNode {
	if node.Slot < slot {
		return nil
	}
	current := node
	for current != nil && slot < current.Slot {
		current = current.Parent
	}
	return current
}
func ( node * ShardBlockNode ) GetAncestorAtSlot ( slot uint64 ) * ShardBlockNode { if node . Slot < slot { return nil } current := node for current != nil && slot < current . Slot { current = current . Parent } return current }
GetAncestorAtSlot gets the first block node that occurred at or before a certain slot.
GetAncestorAtSlot gets the first block node that occurred at or before a certain slot .