lnwallet: populate our HtlcBasePoint when reserving a funding reservation

This commit is contained in:
Olaoluwa Osuntokun 2017-11-14 20:32:39 -08:00
parent 12e5951434
commit 8b0de51003
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21
1 changed files with 11 additions and 2 deletions

View File

@ -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 // 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 // for the duration of the channel. The keys include: our multi-sig
// key, the base revocation key, the base payment key, and the delayed // key, the base revocation key, the base htlc key,the base payment
// payment key. // key, and the delayed payment key.
var err error var err error
reservation.ourContribution.MultiSigKey, err = l.NewRawKey() reservation.ourContribution.MultiSigKey, err = l.NewRawKey()
if err != nil { if err != nil {
@ -533,6 +533,15 @@ func (l *LightningWallet) handleFundingReserveRequest(req *initFundingReserveMsg
req.resp <- nil req.resp <- nil
return 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() reservation.ourContribution.PaymentBasePoint, err = l.NewRawKey()
if err != nil { if err != nil {
req.err <- err req.err <- err