htlcswitch/test: convert makePayment into function

This commit is contained in:
Joost Jager
2019-01-29 13:28:36 +01:00
parent 1b87fbfab2
commit afd2d69906
3 changed files with 26 additions and 26 deletions

View File

@@ -1847,7 +1847,7 @@ func TestLocalPaymentNoForwardingEvents(t *testing.T) {
// proceeding.
receiver := n.bobServer
firstHop := n.firstBobChannelLink.ShortChanID()
_, err = n.makePayment(
_, err = makePayment(
n.aliceServer, receiver, firstHop, hops, amount, htlcAmt,
totalTimelock,
).Wait(30 * time.Second)
@@ -1908,7 +1908,7 @@ func TestMultiHopPaymentForwardingEvents(t *testing.T) {
)
firstHop := n.firstBobChannelLink.ShortChanID()
for i := 0; i < numPayments/2; i++ {
_, err := n.makePayment(
_, err := makePayment(
n.aliceServer, n.carolServer, firstHop, hops, finalAmt,
htlcAmt, totalTimelock,
).Wait(30 * time.Second)
@@ -1961,7 +1961,7 @@ func TestMultiHopPaymentForwardingEvents(t *testing.T) {
// Send the remaining payments.
for i := numPayments / 2; i < numPayments; i++ {
_, err := n.makePayment(
_, err := makePayment(
n.aliceServer, n.carolServer, firstHop, hops, finalAmt,
htlcAmt, totalTimelock,
).Wait(30 * time.Second)