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:
1 parent
01e9bb2bff
commit
8cfb53f64a
11 files changed
+230
-98
No files matched your search
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user