mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-18 14:44:22 +01:00
lnwallet: update commitmentKeyRing to account for distinct HTLC keys
In this commit, we update all the key derivation within the state machine to account for the recent spec change which introduces a distinct key for usages within all HTLC scripts. This change means that the commitment payment and delay base points, are only required to be online in the case that a party is forced to go to chain. We introduce an additional local tweak to the keyring for the HTLC tweak. Additionally, two new keys have been added: a local and a remote HTLC key. Generation of sender/receiver HTLC scripts now use the local and remote HTLC keys rather than the “payment” key for each party. Finally, when creating/verifying signatures for second-level HTLC transactions, we use these the distinct HTLC keys, rather than re-using the payment keys.
This commit is contained in:
@@ -74,7 +74,7 @@ func TestCommitmentSpendValidation(t *testing.T) {
|
||||
keyRing := &commitmentKeyRing{
|
||||
delayKey: aliceDelayKey,
|
||||
revocationKey: revokePubKey,
|
||||
paymentKey: bobPayKey,
|
||||
noDelayKey: bobPayKey,
|
||||
}
|
||||
commitmentTx, err := CreateCommitTx(fakeFundingTxIn, keyRing, csvTimeout,
|
||||
channelBalance, channelBalance, DefaultDustLimit())
|
||||
|
||||
Reference in New Issue
Block a user