lnwallet: Pass around key ring instead of individual keys.

The signatures of some functions/methods in lnwallet are simplified by
passing in a commitmentKeyRing argument instead of multiple keys.
This commit is contained in:
Jim Posen authored and Olaoluwa Osuntokun committed 2017-10-19 22:23:14 -07:00
1 parent 3151a3a596
commit bd497438af
3 files changed
+39 -60

No files matched your search

+7 -3
View File
@@ -71,9 +71,13 @@ func TestCommitmentSpendValidation(t *testing.T) {
// This is Alice's commitment transaction, so she must wait a CSV delay
// of 5 blocks before sweeping the output, while bob can spend
// immediately with either the revocation key, or his regular key.
commitmentTx, err := CreateCommitTx(fakeFundingTxIn, aliceDelayKey,
bobPayKey, revokePubKey, csvTimeout, channelBalance,
channelBalance, DefaultDustLimit())
keyRing := &commitmentKeyRing{
delayKey: aliceDelayKey,
revocationKey: revokePubKey,
paymentKey: bobPayKey,
}
commitmentTx, err := CreateCommitTx(fakeFundingTxIn, keyRing, csvTimeout,
channelBalance, channelBalance, DefaultDustLimit())
if err != nil {
t.Fatalf("unable to create commitment transaction: %v", nil)
}