mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-08 14:57:38 +02:00
lnwallet: add TLV blob to PaymentDescriptor + htlc add
In this commit, we add a TLV blob to the PaymentDescriptor struct. We also now thread through this value from the UpdateAddHTLC message to the PaymentDescriptor mapping, and the other way around.
This commit is contained in:
committed by
Oliver Gugger
parent
d95c1f93f3
commit
c1e641e9d9
@@ -1657,6 +1657,24 @@ func TestHTLCsExtraData(t *testing.T) {
|
||||
),
|
||||
}
|
||||
|
||||
// Custom channel data htlc with a blinding point.
|
||||
customDataHTLC := HTLC{
|
||||
Signature: testSig.Serialize(),
|
||||
Incoming: false,
|
||||
Amt: 10,
|
||||
RHash: key,
|
||||
RefundTimeout: 1,
|
||||
OnionBlob: lnmock.MockOnion(),
|
||||
BlindingPoint: tlv.SomeRecordT(
|
||||
tlv.NewPrimitiveRecord[lnwire.BlindingPointTlvType](
|
||||
pubKey,
|
||||
),
|
||||
),
|
||||
CustomRecords: map[uint64][]byte{
|
||||
uint64(lnwire.MinCustomRecordsTlvType + 3): {1, 2, 3},
|
||||
},
|
||||
}
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
htlcs []HTLC
|
||||
@@ -1678,6 +1696,7 @@ func TestHTLCsExtraData(t *testing.T) {
|
||||
mockHtlc,
|
||||
blindingPointHTLC,
|
||||
mockHtlc,
|
||||
customDataHTLC,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user