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
2017-10-01 19:42:05 -07:00
committed by Olaoluwa Osuntokun
parent 3151a3a596
commit bd497438af
3 changed files with 39 additions and 60 deletions

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)
}