-
Notifications
You must be signed in to change notification settings - Fork 119
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
address to public-key-rmd #52
Comments
Used the tools i have.
…On Fri, Jan 29, 2021, 00:47 hamnaz ***@***.***> wrote:
i have address
bc1qsssfz2x83e8mlhwl52n7y5p8c3rj5r4yk0744y
i want convert to hash160 (20byte)
could you guide what command you saying to work
i tried all way its return always error
thankx for update me
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#52>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANBR6UGCI7FFC6DND65DMHDS4GPJVANCNFSM4WXOZRRQ>
.
|
Since the --batch option dont work, I've made following shell script to make the conversion, I hope this help you guys: |
@voltaxvoltax why do you say batch option does not work? Please give me an example. |
running the command : Failed to decode Base58Check input (checksum failure). |
@voltaxvoltax ok, you are right, seems like a bug. I just tested on some addresses I took from the newest block and the tool behaves unpredictably. It throws errors on some addresses when a file is provided as an input but is able to convert them separately. Also, if the problematic address is at the first or second line of an input file then it works but if it is at the third line it does not. Weird. @matja FYI |
Thanks for the report, I believe I have found the cause of this. |
Pushed 439aaaa to fix batch mode decoding of some addresses. Minimal test case:
expected:
actual:
This happens because the leading zeros in the output buffer is not initialized at: Line 192 in 89fc01d
So the 0x05 address prefix (P2SH), which is not part of the rmd160 hash, is not overwritten by the 0x00 address prefix (P2PKH) of the leading zeros in the second address. Added test to catch this: Test failure (old code):
Test pass (new code):
|
i have address
bc1qsssfz2x83e8mlhwl52n7y5p8c3rj5r4yk0744y
i want convert to hash160 (20byte)
could you guide what command you saying to work
i tried all way its return always error
thankx for update me
The text was updated successfully, but these errors were encountered: