Bitcoin Forum
September 23, 2017, 03:02:09 PM *
News: Latest stable version of Bitcoin Core:  [Torrent]. (New!)
   Home   Help Search Donate Login Register  
Pages: « 1 2 [3]  All
Author Topic: Reading the block chain with a library?  (Read 9271 times)
Offline Offline

Activity: 952

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!