-
Notifications
You must be signed in to change notification settings - Fork 27
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_script_pubkey doesn't support regtest segwit prefix #148
Comments
Sorry for the delay! That makes sense to me, although I'm not much of a regtest-er so not 100% sure. Did you try it against a specific unit test? |
Develop on mainnet or bust! 😂 I didn’t have a chance to try it out yet unfortunately. This was just drive by debugging developing with buidl as a dependency. |
The error message suggests that the address format is not being recognised by the code you're working with. Your suggestion to expand the address format check seems reasonable. If you believe that the bcrt1q prefix is valid for SegWit regtest addresses and you want to add support for it, you could modify the address format check as you've proposed: elif s[:4] in ("bc1q", "tb1q") or s[:6] == "bcrt1q": This change would include support for both SegWit mainnet (bc1q) and SegWit testnet (tb1q) addresses as well as SegWit regtest (bcrt1q) addresses. |
The 'bcrt1q' prefix is valid for Segwit regtest addresses. I can suggest the update as stated above. @mflaxman can I handle it ? |
Trying to build a psbt that's spending to a segwit regtest address results in the following error:
'unknown type of address: bcrt1q26ezj5pth4ta44eku3vmpvnejmsrhkfusczl83xlts5nkzyu3heqdzfqxa',
presumably expanding the check here to something like:
is that all that would be needed?
The text was updated successfully, but these errors were encountered: