From da9a771a582a4be56aff15714f61ab3ab915ffd4 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 18 Oct 2017 22:21:52 -0700 Subject: [PATCH] htlcswitch: update timelock policy mismatch test due to time lock changes In this commit, we update the TestLinkForwardTimelockPolicyMismatch to instead _subtract_ time from the first HTLC extended to the initial hop. We now subtract instead as giving intermediate hops more time is.now permitted. --- htlcswitch/link_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htlcswitch/link_test.go b/htlcswitch/link_test.go index c396e580..c07e46ab 100644 --- a/htlcswitch/link_test.go +++ b/htlcswitch/link_test.go @@ -473,11 +473,11 @@ func TestLinkForwardTimelockPolicyMismatch(t *testing.T) { // time-lock value to account for the decrements over the entire route. htlcAmt, htlcExpiry, hops := generateHops(amount, testStartingHeight, n.firstBobChannelLink, n.carolChannelLink) - htlcExpiry += 10 + htlcExpiry -= 2 // Next, we'll make the payment which'll send an HTLC with our // specified parameters to the first hop in the route. - _, err := n.makePayment(n.aliceServer, n.bobServer, + _, err := n.makePayment(n.aliceServer, n.carolServer, n.bobServer.PubKey(), hops, amount, htlcAmt, htlcExpiry) // We should get an error, and that error should indicate that the HTLC