Address.balance() and Cluster.balance() returning incorrect values
mudabbirk opened this issue · comments
For verification purposes, I use the Address.balance() and the Cluster.balance() functions on address "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" which was the recipient of the first Bitcoin transaction (Block 0 coinbase transaction). The balance() functions return incorrect balance both for arguments (height = 1) and no arguments (current height). Is this a bug or am I missing something?
STEPS:
import blocksci
chain = blocksci.Blockchain('/home/ubuntu/bitcoin-data')
clusterManager = blocksci.cluster.ClusterManager('/home/ubuntu/bitcoin-clusters', chain)
Address = chain.address_from_string("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa")
print(Address.balance(10))
print(Address.balance())
C1=clusterManager.cluster_with_address(chain.address_from_string("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"))
print(C1.balance(10))
print(C1.balance())
OUTPUT:
0
1250
0
1250
Blockchain.info explorer shows that the address still has those first Bitcoins unspent:
https://www.blockchain.com/btc/address/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
See #322