func (i *ShardBlockIndex) GetNodeByHash(h *chainhash.Hash) (*ShardBlockNode, error) {
	i.Lock.RLock()
	defer i.Lock.RUnlock()

	node, found := i.Index[*h]
	if !found {
		return nil, fmt.Errorf("do not have block with hash %s", h)
	}

	return node, nil
}
// GetNodeByHash gets a block node by hash.
GetNodeByHash gets a block node by hash.
// GetNodeByHash gets a block node by hash .
func (i *ShardBlockIndex) GetNodeByHash(h *chainhash.Hash) (*ShardBlockNode, error) {
	i.Lock.RLock()
	defer i.Lock.RUnlock()
	node, found := i.Index[*h]
	if !found {
		return nil, fmt.Errorf("do not have block with hash %s", h)
	}
	return node, nil
}
func ( i * ShardBlockIndex ) GetNodeByHash ( h * chainhash . Hash ) ( * ShardBlockNode , error ) { i . Lock . RLock ( ) defer i . Lock . RUnlock ( ) node , found := i . Index [ * h ] if ! found { return nil , fmt . Errorf ( " " , h ) } return node , nil }
GetNodeByHash gets a block node by hash.
GetNodeByHash gets a block node by hash .