func (c *ShardChain) Next(node *index.ShardBlockNode) *index.ShardBlockNode {
	c.lock.Lock()
	defer c.lock.Unlock()

	if c.contains(node) && uint64(len(c.chain)) > node.Height+1 {
		return c.chain[node.Height+1]
	}

	return nil
}
// Next gets the next block node in the chian.
Next gets the next block node in the chian.
// Next gets the next block node in the chian .
func (c *ShardChain) Next(node *index.ShardBlockNode) *index.ShardBlockNode {
	c.lock.Lock()
	defer c.lock.Unlock()
	if c.contains(node) && uint64(len(c.chain)) > node.Height+1 {
		return c.chain[node.Height+1]
	}
	return nil
}
func ( c * ShardChain ) Next ( node * index . ShardBlockNode ) * index . ShardBlockNode { c . lock . Lock ( ) defer c . lock . Unlock ( ) if c . contains ( node ) && uint64 ( len ( c . chain ) ) > node . Height + 1 { return c . chain [ node . Height + 1 ] } return nil }
Next gets the next block node in the chian.
Next gets the next block node in the chian .