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

block.miner doesn't work? #76

Closed
paulperry opened this issue Mar 31, 2018 · 1 comment · Fixed by #103
Closed

block.miner doesn't work? #76

paulperry opened this issue Mar 31, 2018 · 1 comment · Fixed by #103
Labels

Comments

@paulperry
Copy link

paulperry commented Mar 31, 2018

last_block = chain[len(chain)-1]
last_block

Block(numTxes=2348, height=515314, header_hash=000000000000000000308ef88b0b0d651eaa78d77d3e808e455bae1d74850ade, version=536870912, timestamp=1522112185, bits=391203401, nonce=1150818354)

last_block.miner()

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-21-710dd2f8c2a6> in <module>()
----> 1 last_block.miner()

~/BlockSci/Notebooks/blocksci/__init__.py in get_miner(block)
    165         with open(loaderDirectory + "/Blockchain-Known-Pools/pools.json") as f:
    166             pool_data = json.load(f)
--> 167         addresses = [Address.from_string(addr_string) for addr_string in pool_data["payout_addresses"]]
    168         tagged_addresses = {pointer: pool_data["payout_addresses"][address] for address in addresses if address in pool_data["payout_addresses"]}
    169         coinbase_tag_re = re.compile('|'.join(map(re.escape, pool_data["coinbase_tags"])))

~/BlockSci/Notebooks/blocksci/__init__.py in <listcomp>(.0)
    165         with open(loaderDirectory + "/Blockchain-Known-Pools/pools.json") as f:
    166             pool_data = json.load(f)
--> 167         addresses = [Address.from_string(addr_string) for addr_string in pool_data["payout_addresses"]]
    168         tagged_addresses = {pointer: pool_data["payout_addresses"][address] for address in addresses if address in pool_data["payout_addresses"]}
    169         coinbase_tag_re = re.compile('|'.join(map(re.escape, pool_data["coinbase_tags"])))

AttributeError: type object 'blocksci.blocksci_interface.Address' has no attribute 'from_string'

Same for blocksci.get_miner(last_block)

@hkalodner hkalodner added the bug label Apr 3, 2018
@hkalodner
Copy link
Collaborator

This is definitely a bug in v0.4.5. This method missed the API update. This will be fixed in the next version which should be out this week some time.

hkalodner added a commit that referenced this issue May 3, 2018
Update BlockSci to v0.5.0

Version 0.5.0 focuses mainly on improvements and cleanups in the python interface. The largest new feature is the introduction of vectorized operations which return NumPy arrays, enabling much more rapid usage of BlockSci's python interface. You can read more details about the release in the [release notes](https://citp.github.io/BlockSci/changelog.html#version-0-5-0).

Fixes #72, fixes #76, fixes #84, and fixes #98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants