From 8b0de510034772a450f4b9ab4d785fa1da7d07dd Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 14 Nov 2017 20:32:39 -0800 Subject: [PATCH] lnwallet: populate our HtlcBasePoint when reserving a funding reservation --- lnwallet/wallet.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lnwallet/wallet.go b/lnwallet/wallet.go index a885648a..7fd6d90a 100644 --- a/lnwallet/wallet.go +++ b/lnwallet/wallet.go @@ -518,8 +518,8 @@ func (l *LightningWallet) handleFundingReserveRequest(req *initFundingReserveMsg // Next, we'll grab a series of keys from the wallet which will be used // for the duration of the channel. The keys include: our multi-sig - // key, the base revocation key, the base payment key, and the delayed - // payment key. + // key, the base revocation key, the base htlc key,the base payment + // key, and the delayed payment key. var err error reservation.ourContribution.MultiSigKey, err = l.NewRawKey() if err != nil { @@ -533,6 +533,15 @@ func (l *LightningWallet) handleFundingReserveRequest(req *initFundingReserveMsg req.resp <- nil return } + reservation.ourContribution.HtlcBasePoint, err = l.NewRawKey() + if err != nil { + req.err <- err + req.resp <- nil + return + } + // TODO(roasbeef); allow for querying to extract key distinct from HD + // chain + // * allows for offline commitment keys reservation.ourContribution.PaymentBasePoint, err = l.NewRawKey() if err != nil { req.err <- err