chainregistry: init secret key ring wth CoinType from params

This commit is contained in:
Conner Fromknecht 2018-03-12 16:31:31 -07:00
parent 55da4cc547
commit 2447f3097f
No known key found for this signature in database
GPG Key ID: 39DE78FBE6ACB0EF

@ -134,6 +134,7 @@ func newChainControlFromConfig(cfg *config, chanDB *channeldb.DB,
DataDir: homeChainConfig.ChainDir,
NetParams: activeNetParams.Params,
FeeEstimator: cc.feeEstimator,
CoinType: activeNetParams.CoinType,
}
var (
@ -436,6 +437,10 @@ func newChainControlFromConfig(cfg *config, chanDB *channeldb.DB,
cc.signer = wc
cc.chainIO = wc
keyRing := keychain.NewBtcWalletKeyRing(
wc.InternalWallet(), activeNetParams.CoinType,
)
// Create, and start the lnwallet, which handles the core payment
// channel logic, and exposes control via proxy state machines.
walletCfg := lnwallet.Config{
@ -444,7 +449,7 @@ func newChainControlFromConfig(cfg *config, chanDB *channeldb.DB,
WalletController: wc,
Signer: cc.signer,
FeeEstimator: cc.feeEstimator,
SecretKeyRing: keychain.NewBtcWalletKeyRing(wc.InternalWallet()),
SecretKeyRing: keyRing,
ChainIO: cc.chainIO,
DefaultConstraints: defaultChannelConstraints,
NetParams: *activeNetParams.Params,