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.
This commit is contained in:
Olaoluwa Osuntokun 2017-10-18 22:21:52 -07:00
parent 6a255fb588
commit da9a771a58
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -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