func (c *ShardChain) tip() (*index.ShardBlockNode, error) {
	if len(c.chain) == 0 {
		return nil, errors.New("empty blockchain")
	}

	return c.chain[len(c.chain)-1], nil
}
// tip gets the block node of the tip. Should be called with the lock held.
tip gets the block node of the tip. Should be called with the lock held.
// tip gets the block node of the tip . Should be called with the lock held .
func (c *ShardChain) tip() (*index.ShardBlockNode, error) {
	if len(c.chain) == 0 {
		return nil, errors.New("empty blockchain")
	}
	return c.chain[len(c.chain)-1], nil
}
func ( c * ShardChain ) tip ( ) ( * index . ShardBlockNode , error ) { if len ( c . chain ) == 0 { return nil , errors . New ( " " ) } return c . chain [ len ( c . chain ) - 1 ] , nil }
tip gets the block node of the tip.
tip gets the block node of the tip .