lnwallet: add initial unit tests for musig2+tapscript root chans

This commit is contained in:
Olaoluwa Osuntokun authored and Oliver Gugger committed 2024-08-28 11:52:31 +02:00
1 parent 82ba5bf0bf
commit 8588c9bfd7
2 files changed
+32

No files matched your search

+16
View File
@@ -386,6 +386,12 @@ func TestSimpleAddSettleWorkflow(t *testing.T) {
)
})
t.Run("taproot with tapscript root", func(t *testing.T) {
flags := channeldb.SimpleTaprootFeatureBit |
channeldb.TapscriptRootBit
testAddSettleWorkflow(t, true, flags, false)
})
t.Run("storeFinalHtlcResolutions=true", func(t *testing.T) {
testAddSettleWorkflow(t, false, 0, true)
})
@@ -828,6 +834,16 @@ func TestForceClose(t *testing.T) {
anchorAmt: AnchorSize * 2,
})
})
t.Run("taproot with tapscript root", func(t *testing.T) {
testForceClose(t, &forceCloseTestCase{
chanType: channeldb.SingleFunderTweaklessBit |
channeldb.AnchorOutputsBit |
channeldb.SimpleTaprootFeatureBit |
channeldb.TapscriptRootBit,
expectedCommitWeight: input.TaprootCommitWeight,
anchorAmt: AnchorSize * 2,
})
})
}
type forceCloseTestCase struct {