From 246164e290a9533badacc4b0e0b0e95e93df49b0 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 12 Sep 2017 21:31:55 +0200 Subject: [PATCH] htlcswitch: when generating routes in test payload for last hop in absolute timeout --- htlcswitch/test_utils.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htlcswitch/test_utils.go b/htlcswitch/test_utils.go index f7fb19b2f..0e6b3f1c4 100644 --- a/htlcswitch/test_utils.go +++ b/htlcswitch/test_utils.go @@ -361,9 +361,9 @@ func generateHops(payAmt lnwire.MilliSatoshi, startingHeight uint32, } // If this is the last, hop, then the time lock will be their - // specified delta policy. - timeLock := lastHop.cfg.FwrdingPolicy.TimeLockDelta - totalTimelock += timeLock + // specified delta policy plus our starting height. + totalTimelock += lastHop.cfg.FwrdingPolicy.TimeLockDelta + timeLock := totalTimelock // Otherwise, the outgoing time lock should be the incoming // timelock minus their specified delta.