Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using filter_txes() method on the BlockSci AMI #50

Closed
jkrol21 opened this issue Jan 29, 2018 · 3 comments · Fixed by #60
Closed

Error using filter_txes() method on the BlockSci AMI #50

jkrol21 opened this issue Jan 29, 2018 · 3 comments · Fixed by #60

Comments

@jkrol21
Copy link

jkrol21 commented Jan 29, 2018

Hello when I tried to use the filter_txes() method but ran into an error.
Do I have a bug in my code or is it a BlockSci issue?
Seems to me that the tx_with_index() method has been deleted in BlockSci version 0.3.

grafik

hkalodner added a commit that referenced this issue Mar 9, 2018
@hkalodner
Copy link
Collaborator

Good catch. I just fixed this in master and I'll update the AMI.

@polac
Copy link

polac commented Mar 13, 2018

Hi @hkalodner, I proposed fix for this in #57.

Your way of fixing the problem causes at least for me the following error:

~/BlockSci/Notebooks/blocksci/init.py in filter_txes(self, filterFunc, start, end, cpu_count)
85 init = list()
86 tx_ids = mapreduce_block_ranges(self, mapFunc, reduceFunc, init, start, end, cpu_count)
---> 87 return [Tx(x) for x in tx_ids]
88
89 Blockchain.map_blocks = map_blocks

~/BlockSci/Notebooks/blocksci/init.py in (.0)
85 init = list()
86 tx_ids = mapreduce_block_ranges(self, mapFunc, reduceFunc, init, start, end, cpu_count)
---> 87 return [Tx(x) for x in tx_ids]
88
89 Blockchain.map_blocks = map_blocks

TypeError: init(): incompatible constructor arguments. The following argument types are supported:
1. blocksci.blocksci_interface.Tx(arg0: int)
2. blocksci.blocksci_interface.Tx(arg0: str)

Invoked with: []

@hkalodner
Copy link
Collaborator

hkalodner commented Mar 14, 2018

Ah there was actually a second bug that neither of us caught which should be fixed in our next release which should be coming out shortly. In the reduce method cur + [el] should have been cur + el.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants