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:
1 parent
3151a3a596
commit
bd497438af
3 files changed
+39
-60
No files matched your search
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user