@@ -28,6 +28,7 @@ import (
2828 "github.com/lightningnetwork/lnd/lnwallet/chainfee"
2929 "github.com/lightningnetwork/lnd/lnwire"
3030 "github.com/lightningnetwork/lnd/tlv"
31+ "github.com/stretchr/testify/mock"
3132 "github.com/stretchr/testify/require"
3233)
3334
@@ -3368,6 +3369,10 @@ func TestChanSyncOweCommitment(t *testing.T) {
33683369 }
33693370}
33703371
3372+ type testSigBlob struct {
3373+ BlobInt tlv.RecordT [tlv.TlvType65634 , uint16 ]
3374+ }
3375+
33713376// TestChanSyncOweCommitmentAuxSigner tests that when one party owes a
33723377// signature after a channel reest, if an aux signer is present, then the
33733378// signature message sent includes the additional aux sigs as extra data.
@@ -3411,12 +3416,23 @@ func TestChanSyncOweCommitmentAuxSigner(t *testing.T) {
34113416
34123417 // We'll set up the mock to expect calls to PackSigs and also
34133418 // SubmitSubmitSecondLevelSigBatch.
3414- sigBlobs := bytes .Repeat ([]byte {0x01 }, 64 )
3419+ var sigBlobBuf bytes.Buffer
3420+ sigBlob := testSigBlob {
3421+ BlobInt : tlv.NewPrimitiveRecord [tlv.TlvType65634 , uint16 ](5 ),
3422+ }
3423+ tlvStream , err := tlv .NewStream (sigBlob .BlobInt .Record ())
3424+ require .NoError (t , err , "unable to create tlv stream" )
3425+ require .NoError (t , tlvStream .Encode (& sigBlobBuf ))
3426+
34153427 auxSigner .On (
34163428 "SubmitSecondLevelSigBatch" , mock .Anything , mock .Anything ,
34173429 mock .Anything ,
34183430 ).Return (nil ).Twice ()
3419- auxSigner .On ("PackSigs" , mock .Anything ).Return (fn .Some (sigBlobs ), nil )
3431+ auxSigner .On (
3432+ "PackSigs" , mock .Anything ,
3433+ ).Return (
3434+ fn .Some (sigBlobBuf .Bytes ()), nil ,
3435+ )
34203436
34213437 _ , err = aliceChannel .SignNextCommitment ()
34223438 require .NoError (t , err , "unable to sign commitment" )
@@ -3443,10 +3459,8 @@ func TestChanSyncOweCommitmentAuxSigner(t *testing.T) {
34433459 require .True (t , ok )
34443460 require .True (t , sigMsg .PartialSig .IsSome ())
34453461
3446- // The signature should have the ExtraData field set.
3447- require .NotNil (t , sigMsg .ExtraData )
3448-
3449- // TODO(roasbeef): also make one for owe revocation
3462+ // The signature should have the CustomRecords field set.
3463+ require .NotEmpty (t , sigMsg .CustomRecords )
34503464}
34513465
34523466func testChanSyncOweCommitmentPendingRemote (t * testing.T ,
0 commit comments