citp / BlockSci

A high-performance tool for blockchain science and exploration

Home Page:https://citp.github.io/BlockSci/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

the balance property is no correct for some address

JVfisher opened this issue · comments

Please provide a clear and concise description of the problem.

Blocksci is a wondful tool! but I found that there are two results about balance of the address like '1PTYXwamXXgQoAhDbmUf98rY2Pg1pYXhin' .
if I get the balance by the method provided by the address class or I calculate the balance with the code in other issues.
"address_balances = chain.blocks.outputs.where(lambda o: ~o.is_spent).group_by(
lambda output: output.address,
lambda outputs: outputs.value.sum
)"

I double checked the results. the balance property is wrong. the result of the calculation of up code is right.

Reproduction Steps

for more information, when I run "[(atx.hash,atx.index) for atx in chain.address_from_string('1PTYXwamXXgQoAhDbmUf98rY2Pg1pYXhin').output_txes]", I got 24 transaction when the right answer is 25. "6bf2fb101058394e3aa7f79c188cd1967ccf76ac1cebc33c3c7fc510272f98aa" is missing.
when I use "chain.address_from_string('1PTYXwamXXgQoAhDbmUf98rY2Pg1pYXhin').first_tx.hash", I can get "6bf2fb101058394e3aa7f79c188cd1967ccf76ac1cebc33c3c7fc510272f98aa"