jimmysong / pybtcfork

Python Library for splitting hard forks
MIT License
61 stars 19 forks source link

Bitcoin private address overflow? #17

Open rustyrussell opened 6 years ago

rustyrussell commented 6 years ago

Seems it can't decode the BTCP address b1PDnwGsgBcDpkqjxgmTvrj9R2kQyeEZHZ4: have they changed the length or something?

OverflowError                             Traceback (most recent call last)
<ipython-input-1-bb8de2d1ec62> in <module>()
     28     num += i
     29 
---> 30 print(decode_base58(destination))
     31 # sanity check
     32 if not decode_base58(destination)[:len(prefix)] == prefix:

/pybtcfork/helper.py in decode_base58(s, num_bytes, strip_leading_zeros)
     47         num *= 58
     48         num += BASE58_ALPHABET.index(c)
---> 49     combined = num.to_bytes(num_bytes, byteorder='big')
     50     if strip_leading_zeros:
     51         while combined[0] == 0:
viknash commented 6 years ago

I am having the same issue with this address b19YRNx6Cn6CRXFNZA4m4JPdB3CEMm1SyNS