contractcourt: add CommitBlob to taprootBriefcase

This'll be used to store the extra resolution information for the
commitment outputs.
This commit is contained in:
Olaoluwa Osuntokun committed 2024-10-02 18:09:51 -07:00
1 parent 4619cefc8f
commit f74d1ce53b
3 files changed
+61 -2

No files matched your search

+10
View File
@@ -70,6 +70,10 @@ func TestTaprootBriefcase(t *testing.T) {
_, err = rand.Read(anchorTweak[:])
require.NoError(t, err)
var commitBlob [100]byte
_, err = rand.Read(commitBlob[:])
require.NoError(t, err)
testCase := &taprootBriefcase{
CtrlBlocks: tlv.NewRecordT[tlv.TlvType0](ctrlBlocks{
CommitSweepCtrlBlock: sweepCtrlBlock[:],
@@ -83,6 +87,12 @@ func TestTaprootBriefcase(t *testing.T) {
BreachedHtlcTweaks: randHtlcTweaks(t),
BreachedSecondLevelHltcTweaks: randHtlcTweaks(t),
}),
SettledCommitBlob: tlv.SomeRecordT(
tlv.NewPrimitiveRecord[tlv.TlvType2](commitBlob[:]),
),
BreachedCommitBlob: tlv.SomeRecordT(
tlv.NewPrimitiveRecord[tlv.TlvType3](commitBlob[:]),
),
}
var b bytes.Buffer