예제 #1
0
 def get_balance(self, addr):
     bc = BlockChain()
     balance = 0
     utxo = UTXOSet()
     utxo.reindex(bc)
     utxos = utxo.find_utxo(addr)
     print(utxos)
     for fout in utxos:
         balance += fout.txoutput.value
     print('%s balance is %d' % (addr, balance))
     return balance
예제 #2
0
 def _find_unspent_transactions(self, address):
     """
     Find all unspent transactions
     """
     uxto_set = UTXOSet()
     uxto_set.find_utxo(address)