Merge pull request #1448 from Roasbeef/check-invoice-min-final
channeldb+htlcswitch: use the final min cltv delta in the invoice when link at exit hop
This commit is contained in:
4 files changed
+28
-7
No files matched your search
+2
-3
@@ -2258,9 +2258,8 @@ func (l *channelLink) processRemoteAdds(fwdPkg *channeldb.FwdPkg,
|
||||
|
||||
// We'll also ensure that our time-lock value has been
|
||||
// computed correctly.
|
||||
//
|
||||
// TODO(roasbeef): also accept global default?
|
||||
expectedHeight := heightNow + l.cfg.FwrdingPolicy.TimeLockDelta
|
||||
minCltvDelta := uint32(invoice.Terms.FinalCltvDelta)
|
||||
expectedHeight := heightNow + minCltvDelta
|
||||
switch {
|
||||
|
||||
case !l.cfg.DebugHTLC && fwdInfo.OutgoingCTLV < expectedHeight:
|
||||
|
||||
Reference in new issue
Block a user