lnwallet: support transactions and scripts for new commitment type

This commit modifies the channel state machine to be able to derive the
proper commitment and second-level HTLC output scripts required by the
new script-enforced leased channel commitment type.
This commit is contained in:
Wilmer Paulino authored and Olaoluwa Osuntokun committed 2021-10-19 18:30:32 -07:00
1 parent 01e9bb2bff
commit 8cfb53f64a
11 files changed
+230 -98

No files matched your search

+2 -2
View File
@@ -573,7 +573,7 @@ func testSpendValidation(t *testing.T, tweakless bool) {
}
commitmentTx, err := CreateCommitTx(
channelType, *fakeFundingTxIn, keyRing, aliceChanCfg,
bobChanCfg, channelBalance, channelBalance, 0,
bobChanCfg, channelBalance, channelBalance, 0, true, 0,
)
if err != nil {
t.Fatalf("unable to create commitment transaction: %v", nil)
@@ -889,7 +889,7 @@ func createTestChannelsForVectors(tc *testContext, chanType channeldb.ChannelTyp
remoteCommitTx, localCommitTx, err := CreateCommitmentTxns(
remoteBalance, localBalance-commitFee,
&remoteCfg, &localCfg, remoteCommitPoint,
localCommitPoint, *fundingTxIn, chanType,
localCommitPoint, *fundingTxIn, chanType, true, 0,
)
require.NoError(t, err)