Bitcoin Forum
December 04, 2016, 08:18:38 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
   Home   Help Search Donate Login Register  
Pages: « 1 2 [3]  All
Author Topic: Reading the block chain with a library?  (Read 8837 times)
Offline Offline

Activity: 924

View Profile WWW
October 07, 2012, 08:55:12 PM

Never mind. I was structuring my code wrong so the previous cppWallet wasn't deleted from memory before starting with the next (I think that's what was wrong). This works:

from armoryengine import *

def get_balance(addresses):
   cppWallet = Cpp.BtcWallet()

   for address in addresses:
      cppWallet.addAddress_1_( address )

   fullBalance = cppWallet.getFullBalance()
   balance = coin2str(fullBalance)

   return balance
Pages: « 1 2 [3]  All
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!