htlcswitch: extend the HtlcSatifiesPolicy to also accept timelock/height info
In this commit, we extend the existing HtlcSatifiesPolicy method to also accept timelock and height information. This is required as an upcoming commit will fix an existing bug in the forwarding logic wherein we use the time lock policies of the incoming node rather than that of the outgoing node.
This commit is contained in:
3 files changed
+8
-4
No files matched your search
+3
-1
@@ -1741,7 +1741,9 @@ func (l *channelLink) UpdateForwardingPolicy(newPolicy ForwardingPolicy) {
|
||||
//
|
||||
// NOTE: Part of the ChannelLink interface.
|
||||
func (l *channelLink) HtlcSatifiesPolicy(payHash [32]byte,
|
||||
incomingHtlcAmt, amtToForward lnwire.MilliSatoshi) lnwire.FailureMessage {
|
||||
incomingHtlcAmt, amtToForward lnwire.MilliSatoshi,
|
||||
incomingTimeout, outgoingTimeout uint32,
|
||||
heightNow uint32) lnwire.FailureMessage {
|
||||
|
||||
l.RLock()
|
||||
policy := l.cfg.FwrdingPolicy
|
||||
|
||||
Reference in new issue
Block a user