contractcourt: convert taprootBriefcase to use new tlv record type

This commit doesn't yet go all the way to modify all the other records
quite yet.
This commit is contained in:
Olaoluwa Osuntokun committed 2024-10-02 18:09:49 -07:00
1 parent bf0bd64023
commit 0f2c16de99
4 files changed
+88 -96

No files matched your search

+5 -4
View File
@@ -5,6 +5,7 @@ import (
"math/rand"
"testing"
"github.com/lightningnetwork/lnd/tlv"
"github.com/stretchr/testify/require"
)
@@ -70,18 +71,18 @@ func TestTaprootBriefcase(t *testing.T) {
require.NoError(t, err)
testCase := &taprootBriefcase{
CtrlBlocks: &ctrlBlocks{
CtrlBlocks: tlv.NewRecordT[tlv.TlvType0](ctrlBlocks{
CommitSweepCtrlBlock: sweepCtrlBlock[:],
RevokeSweepCtrlBlock: revokeCtrlBlock[:],
OutgoingHtlcCtrlBlocks: randResolverCtrlBlocks(t),
IncomingHtlcCtrlBlocks: randResolverCtrlBlocks(t),
SecondLevelCtrlBlocks: randResolverCtrlBlocks(t),
},
TapTweaks: &tapTweaks{
}),
TapTweaks: tlv.NewRecordT[tlv.TlvType1](tapTweaks{
AnchorTweak: anchorTweak[:],
BreachedHtlcTweaks: randHtlcTweaks(t),
BreachedSecondLevelHltcTweaks: randHtlcTweaks(t),
},
}),
}
var b bytes.Buffer