Skip to content

Commit

Permalink
address: add work around for lnd coin type mismatch
Browse files Browse the repository at this point in the history
Tracking the issue on the ind side with:
lightningnetwork/lnd#6952
  • Loading branch information
Roasbeef committed Sep 28, 2022
1 parent 943d000 commit fa06794
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion address/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ func Net(hrp string) (*ChainParams, error) {
return &SigNetTaro, nil

case SimNetTaro.TaroHRP:
// For simnet, we'll need to slighlty modify the coin type as
// lnd only ever expects the testnet coin type (1) instead of
// the simnet coin type (115).
simNet := SimNetTaro
simNet.HDCoinType = TestNet3Taro.HDCoinType

return &SimNetTaro, nil

default:
Expand All @@ -151,7 +157,13 @@ func ParamsForChain(name string) ChainParams {
return SigNetTaro

case chaincfg.SimNetParams.Name:
return SimNetTaro
// For simnet, we'll need to slighlty modify the coin type as
// lnd only ever expects the testnet coin type (1) instead of
// the simnet coin type (115).
simNet := SimNetTaro
simNet.HDCoinType = TestNet3Taro.HDCoinType

return simNet

default:
panic(fmt.Sprintf("unknown chain: %v", name))
Expand Down

0 comments on commit fa06794

Please sign in to comment.