htlcswitch: thread through packet's inbound wire records
For calculating the available auxiliary bandwidth of a channel, we need access to the inbound custom wire records of the HTLC packet, which might contain auxiliary information about the worth of the HTLC packet apart from the BTC value being transported.
This commit is contained in:
5 files changed
+55
-48
No files matched your search
@@ -272,10 +272,10 @@ type ChannelLink interface {
|
||||
// in order to signal to the source of the HTLC, the policy consistency
|
||||
// issue.
|
||||
CheckHtlcForward(payHash [32]byte, incomingAmt lnwire.MilliSatoshi,
|
||||
amtToForward lnwire.MilliSatoshi,
|
||||
incomingTimeout, outgoingTimeout uint32,
|
||||
inboundFee models.InboundFee,
|
||||
heightNow uint32, scid lnwire.ShortChannelID) *LinkError
|
||||
amtToForward lnwire.MilliSatoshi, incomingTimeout,
|
||||
outgoingTimeout uint32, inboundFee models.InboundFee,
|
||||
heightNow uint32, scid lnwire.ShortChannelID,
|
||||
customRecords lnwire.CustomRecords) *LinkError
|
||||
|
||||
// CheckHtlcTransit should return a nil error if the passed HTLC details
|
||||
// satisfy the current channel policy. Otherwise, a LinkError with a
|
||||
@@ -283,7 +283,8 @@ type ChannelLink interface {
|
||||
// the violation. This call is intended to be used for locally initiated
|
||||
// payments for which there is no corresponding incoming htlc.
|
||||
CheckHtlcTransit(payHash [32]byte, amt lnwire.MilliSatoshi,
|
||||
timeout uint32, heightNow uint32) *LinkError
|
||||
timeout uint32, heightNow uint32,
|
||||
customRecords lnwire.CustomRecords) *LinkError
|
||||
|
||||
// Stats return the statistics of channel link. Number of updates,
|
||||
// total sent/received milli-satoshis.
|
||||
|
||||
Reference in new issue
Block a user