func (c *Chain) GetBlockBySlot(slot uint64) *BlockNode {
	tip := c.Tip()
	if tip == nil {
		return nil
	}
	if tip.Slot < slot {
		return tip
	}
	return tip.GetAncestorAtSlot(slot)
}
// GetBlockBySlot gets the block node at a certain slot.
GetBlockBySlot gets the block node at a certain slot.
// GetBlockBySlot gets the block node at a certain slot .
func (c *Chain) GetBlockBySlot(slot uint64) *BlockNode {
	tip := c.Tip()
	if tip == nil {
		return nil
	}
	if tip.Slot < slot {
		return tip
	}
	return tip.GetAncestorAtSlot(slot)
}
func ( c * Chain ) GetBlockBySlot ( slot uint64 ) * BlockNode { tip := c . Tip ( ) if tip == nil { return nil } if tip . Slot < slot { return tip } return tip . GetAncestorAtSlot ( slot ) }
GetBlockBySlot gets the block node at a certain slot.
GetBlockBySlot gets the block node at a certain slot .