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
2024-06-03 22:56:06 -07:00
parent 4619cefc8f
commit f74d1ce53b
3 changed files with 61 additions and 2 deletions

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