Closed dannypaz closed 5 years ago
@cfromknecht Could you take a look at this? Would this be the best way to resolve this issue? It's a critical bug that prevents people from sending LTC out of lnd on-chain.
@cfromknecht thanks for the review. I've updated the PR
@Roasbeef Are you able to merge this PR?
+1 please look into merging this. i have LTC locked in a node that i need to get out ASAP. thanks
The proper solution is to correct our LTC integration within lnd, but in the short term, merging this in order to make it useable again.
This PR fixes a bug where BTCs default chain params from
chaincfg
are being used instead of thedefaultNet
when trying to decode a wallet address inDecodeAddress
.A user may want to override the default values of
chaincfg
by passing in a different set ofdefaultNet
params, howeverDecodeAddress
will currently throwErrUnknownAddressType
if the P2PKH or P2SH values do not match the default hardcoded values found inbtcd/chaincfg
.An additional benefit to this change is that P2PKH and P2SH values are scoped to the network instead of checking ALL values that were configured with
chaincfg