lnwire: add inbound fee to ChannelUpdate2

We leave a TODO that should be addressed after a discussion at the spec
meeting. For now, having the incorrect TLV type is not a problem since
this ChannelUpdate2 type is not used in production.
This commit is contained in:
Elle Mouton committed 2025-10-01 13:13:32 +02:00
1 parent b8abe130a5
commit e9a4f22dd6
2 files changed
+28 -1

No files matched your search

+12
View File
@@ -569,6 +569,18 @@ func (c *ChannelUpdate2) RandTestMessage(t *rapid.T) Message {
ExtraSignedFields: make(map[uint64][]byte),
}
if rapid.Bool().Draw(t, "includeInboundFee") {
base := rapid.IntRange(-1000, 1000).Draw(t, "inFeeBase")
rate := rapid.IntRange(-1000, 1000).Draw(t, "inFeeProp")
fee := Fee{
BaseFee: int32(base),
FeeRate: int32(rate),
}
msg.InboundFee = tlv.SomeRecordT(
tlv.NewRecordT[tlv.TlvType55555](fee),
)
}
msg.Signature.Val = RandSignature(t)
msg.Signature.Val.ForceSchnorr()