mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-31 16:09:02 +02:00
Merge pull request #7588 from Roasbeef/simnet-walletrpc-cointype-fix
config: fix bug in walletrpc interaction due to mismatched coin type
This commit is contained in:
commit
5046399991
@ -1231,6 +1231,15 @@ func ValidateConfig(cfg Config, interceptor signal.Interceptor, fileParser,
|
||||
if cfg.Bitcoin.SimNet {
|
||||
numNets++
|
||||
cfg.ActiveNetParams = chainreg.BitcoinSimNetParams
|
||||
|
||||
// For simnet, the btcsuite chain params uses a
|
||||
// cointype of 115. However, we override this in
|
||||
// chainreg/chainparams.go, but the raw ChainParam
|
||||
// field is used elsewhere. To ensure everything is
|
||||
// consistent, we'll also override the cointype within
|
||||
// the raw params.
|
||||
targetCoinType := chainreg.BitcoinSigNetParams.CoinType
|
||||
cfg.ActiveNetParams.Params.HDCoinType = targetCoinType
|
||||
}
|
||||
if cfg.Bitcoin.SigNet {
|
||||
numNets++
|
||||
|
Loading…
x
Reference in New Issue
Block a user