lnwallet: make DeriveRevocationRoot public

In order to be able to use the DeriveRevocationRoot in the createChannel
function inside the htlcswicth package we need to make it public.

NOTE: The original lnwallet.CreateChannel function haven't been
sufficient as far it not takes the private keys as input.
This commit is contained in:
Andrey Samokhvalov authored and Olaoluwa Osuntokun committed 2017-05-31 11:06:08 -07:00
1 parent f774e3d9bf
commit dbcce82d52
3 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -773,7 +773,7 @@ func (l *LightningWallet) handleContributionMsg(req *addContributionMsg) {
// Now that we have their commitment key, we can create the revocation
// key for the first version of our commitment transaction. To do so,
// we'll first create our root, then produce the first pre-image.
root := deriveRevocationRoot(masterElkremRoot, ourKey, theirKey)
root := DeriveRevocationRoot(masterElkremRoot, ourKey, theirKey)
producer := shachain.NewRevocationProducer(*root)
pendingReservation.partialState.RevocationProducer = producer
firstPreimage, err := producer.AtIndex(0)
@@ -914,7 +914,7 @@ func (l *LightningWallet) handleSingleContribution(req *addSingleContributionMsg
// Now that we know their commitment key, we can create the revocation
// key for our version of the initial commitment transaction.
root := deriveRevocationRoot(masterElkremRoot, ourKey, theirKey)
root := DeriveRevocationRoot(masterElkremRoot, ourKey, theirKey)
producer := shachain.NewRevocationProducer(*root)
firstPreimage, err := producer.AtIndex(0)
if err != nil {