func (c *Chain) Tip() *BlockNode {
	c.lock.Lock()
	defer c.lock.Unlock()
	if len(c.chain) == 0 {
		return nil
	}
	return c.chain[len(c.chain)-1]
}
// Tip gets the tip of the chain. Returns nil if no genesis block defined.
Tip gets the tip of the chain. Returns nil if no genesis block defined.
// Tip gets the tip of the chain . Returns nil if no genesis block defined .
func (c *Chain) Tip() *BlockNode {
	c.lock.Lock()
	defer c.lock.Unlock()
	if len(c.chain) == 0 {
		return nil
	}
	return c.chain[len(c.chain)-1]
}
func ( c * Chain ) Tip ( ) * BlockNode { c . lock . Lock ( ) defer c . lock . Unlock ( ) if len ( c . chain ) == 0 { return nil } return c . chain [ len ( c . chain ) - 1 ] }
Tip gets the tip of the chain.
Tip gets the tip of the chain .