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
is wrong, because the checksum is defined to be exactly 40 bits long. 40 bits is 5 bytes, so the correct line is
payload=conveted[1:-5]
However, this line also breaks the code because of the fact that there is another bug. If you look at https://github.com/simon-v/minipos/blob/master/cashaddr.py , you can see that convertbits is supposed to avoid padding on the decode stage. This is why your payload is longer than necessary by one bit.
The line
is wrong, because the checksum is defined to be exactly 40 bits long. 40 bits is 5 bytes, so the correct line is
However, this line also breaks the code because of the fact that there is another bug. If you look at https://github.com/simon-v/minipos/blob/master/cashaddr.py , you can see that
convertbits
is supposed to avoid padding on the decode stage. This is why your payload is longer than necessary by one bit.I have an implementation that is something like a mixture of your implementation and their implementation that fixes these bugs and correctly implements >160 bit lengths at https://github.com/Steve132/wallet_standard/blob/master/python/coffer/coins/_cashaddr.py
The text was updated successfully, but these errors were encountered: