@keep_alive('server')
  def signatures(self, raw_transaction, prevtx):
    transaction_dict = self.server.decoderawtransaction(raw_transaction)

    prevtx_dict = {}
    for tx in prevtx:
      prevtx_dict[str((tx['txid'], tx['vout']))] = tx['redeemScript']

    has_signatures = 999
    for vin in transaction_dict['vin']:
      redeem_script = prevtx_dict[str((vin['txid'], vin['vout']))]
      try:
        asm = vin['scriptSig']['asm']
      except KeyError:
        logging.error('transaction doesn\'t have scriptSig asm')
        continue
      asm_elements = asm.split()
      try:
        asm_script_dict = self.server.decodescript(redeem_script)
        int(asm_script_dict['reqSigs'])
      except KeyError:
        logging.error('script is missing reqSigs field')
        continue
      # first elements is op_zero, last is script, rest is signatuers
      return asm_elements
      current_signatures = len(asm_elements) - 2
      current_signatures = max(current_signatures, 0)
      has_signatures = min(has_signatures, current_signatures)
    return has_signatures
dataset/ETHPy150Open orisi/orisi/src/shared/bitcoind_client/bitcoinclient.py/BitcoinClient.signatures/original