From fa067946a8b630a119e2f8d69c3d09be74fa4e80 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 27 Sep 2022 19:57:14 -0700 Subject: [PATCH] address: add work around for lnd coin type mismatch Tracking the issue on the ind side with: https://github.com/lightningnetwork/lnd/issues/6952 --- address/params.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/address/params.go b/address/params.go index 532efdc19..9df447472 100644 --- a/address/params.go +++ b/address/params.go @@ -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: @@ -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))