priestc / moneywagon

Universal bitcoin/altcoin blockchain client library for Python and the command line
http://multiexplorer.com
MIT License
149 stars 48 forks source link

Genesis block number #25

Closed shkschneider closed 7 years ago

shkschneider commented 7 years ago

Again, playing around with this tool around the genesis block.

$ moneywagon get-block --block_number 0 btc
Traceback (most recent call last):
  File "/usr/local/bin/moneywagon", line 199, in <module>
    block_hash=argz.block_hash or '', latest=argz.latest or False, modes=modes
  File "/usr/local/bin/moneywagon", line 145, in prepare_json
    result = high_level_func(*args, **kwargs)
  File "/home/.../.local/lib/python2.7/site-packages/moneywagon/__init__.py", line 264, in get_block
    services, GetBlock, kwargs, modes=modes
  File "/home/.../.local/lib/python2.7/site-packages/moneywagon/core.py", line 490, in enforce_service_mode
    consensus_results = fetcher.action(**kwargs)
  File "/home/.../.local/lib/python2.7/site-packages/moneywagon/__init__.py", line 459, in action
    raise ValueError("Only one of `block_hash`, `latest`, or `block_number` allowed.")
ValueError: Only one of `block_hash`, `latest`, or `block_number` allowed.

I would expect the genesis block to be printed out, just like: moneywagon get-block --block_hash 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f btc Other block values do work.

Seems like a tiny default value (to zero) problem ^^ Keep up with the amazing work!