You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to build a full graph (all the way back to miners) of one particular address, and I am doing smth like this:
import blocksci
import pandas
import numpy as np
chain = blocksci.Blockchain("/home/ubuntu/blocksci.conf")
test_address = chain.address_from_string('35pgGeez3ou6ofrpjt8T7bvC9t6RrUK4p6')
all_outputs = test_address.outputs.where(lambda o: ~o.is_spent)
all_coinbase_txes = []
#the following part I was planning to put under the 'while' loop, however it does not work even with single-step
txes_cb = all_outputs.where(lambda o: o.tx.is_coinbase)
all_coinbase_txes = all_coinbase_txes + txes_cb.to_list()
txes_ncb = all_outputs.where(lambda o: ~o.tx.is_coinbase)
new_all_outputs = txes_ncb.select(lambda o: o.tx.inputs).select(lambda o: o.spent_output)
print ("New set: %d, old set: %d, final set: %d" % (new_all_outputs.size, all_outputs.size, len(all_coinbase_txes)))
all_outputs = new_all_outputs
It prints all zeros, which is obviously not correct - some internal states of iterators seem to be corrupted by such usage. I have assembled even simplier bug demonstration:
Hello all!
I am trying to build a full graph (all the way back to miners) of one particular address, and I am doing smth like this:
It prints all zeros, which is obviously not correct - some internal states of iterators seem to be corrupted by such usage. I have assembled even simplier bug demonstration:
prints first '146' and then '0'.
May be I am using it wrong?
The text was updated successfully, but these errors were encountered: