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
2017-05-02 02:25:32 +03:00
committed by Olaoluwa Osuntokun
parent f774e3d9bf
commit dbcce82d52
3 changed files with 6 additions and 6 deletions

View File

@@ -752,7 +752,7 @@ func DeriveRevocationPrivKey(commitPrivKey *btcec.PrivateKey,
return privRevoke
}
// deriveRevocationRoot derives an root unique to a channel given the
// DeriveRevocationRoot derives an root unique to a channel given the
// private key for our public key in the 2-of-2 multi-sig, and the remote
// node's multi-sig public key. The seed is derived using the HKDF[1][2]
// instantiated with sha-256. The secret data used is our multi-sig private
@@ -760,7 +760,7 @@ func DeriveRevocationPrivKey(commitPrivKey *btcec.PrivateKey,
//
// [1]: https://eprint.iacr.org/2010/264.pdf
// [2]: https://tools.ietf.org/html/rfc5869
func deriveRevocationRoot(derivationRoot *btcec.PrivateKey,
func DeriveRevocationRoot(derivationRoot *btcec.PrivateKey,
localMultiSigKey *btcec.PublicKey,
remoteMultiSigKey *btcec.PublicKey) *chainhash.Hash {