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
Configured and started btcd and btcwallet daemons (SimNet)
Generated a bunch of addresses using btcctl
Used the btcd/rpcclient library to fetch the addresses by invoking *Client.GetAddressesByAccount(account)
The error:
string not all lowercase or all uppercase
Here is the malformed address:Sb1Hqfcey8tHkBYvpjQ8Nch2zsREaHcgjD
As you can see, the prefix matches SimNet's Bech32 HRP but the address is mixed case which causes the error. I'm not well equipped to check if the address is otherwise Bech32 compliant or not; but since I could only find this one instance between 10K generated addresses, I'm guessing this is just random?! It does however break the API.
How could we make the SegWit address check in the DecodeAddress method better? Would it be feasible to also add a case check to DecodeAddress?
The text was updated successfully, but these errors were encountered:
Here's what I did:
btcd
andbtcwallet
daemons (SimNet)btcctl
btcd/rpcclient
library to fetch the addresses by invoking*Client.GetAddressesByAccount(account)
The error:
Here is the malformed address:
Sb1Hqfcey8tHkBYvpjQ8Nch2zsREaHcgjD
As you can see, the prefix matches SimNet's Bech32 HRP but the address is mixed case which causes the error. I'm not well equipped to check if the address is otherwise Bech32 compliant or not; but since I could only find this one instance between 10K generated addresses, I'm guessing this is just random?! It does however break the API.
How could we make the SegWit address check in the
DecodeAddress
method better? Would it be feasible to also add a case check toDecodeAddress
?The text was updated successfully, but these errors were encountered: