def blockchain_get_transactions_from_block(self, block, addresses):
    transactions_per_address = {}
    for addr in addresses:
      transactions_per_address[addr]= []

    transaction_ids = block['tx']

    address_chunks = slice_list(addresses, 5)
    transactions_on_addresses = []

    for chunk in address_chunks:
      if len(chunk) == 0:
        continue

      data = safe_blockchain_multiaddress(chunk)
      if data:
        txs = data['txs']
        for tx in txs:
          if tx['hash'] in transaction_ids:
            transactions_on_addresses.append(tx['hash'])

    logging.info(transactions_on_addresses)

    for tx in transactions_on_addresses:
      try:
        logging.debug('getting tx from address')
        raw_transaction = self.get_raw_transaction(tx)
      except ProtocolError:
        continue
      transaction = self.decode_raw_transaction(raw_transaction)
      for vout in transaction['vout']:
        if not 'addresses' in vout['scriptPubKey']:
          continue
        addresses_in_vout = set(vout['scriptPubKey']['addresses'])
        for addr in addresses:
          if addr in addresses_in_vout:
            transactions_per_address[addr].append(transaction)

    logging.info(transactions_per_address)
    return transactions_per_address
dataset/ETHPy150Open orisi/orisi/src/shared/bitcoind_client/bitcoinclient.py/BitcoinClient.blockchain_get_transactions_from_block/original