lntest/itest: force dave to use the legacy onion payload in multi-hop pay test

In this commit, we force Dave to use the legacy onion payload for the
multi-hop test to ensure that we're able to properly mix the old and new
formats, and have all nodes properly decode+forward the HTLC.
This commit is contained in:
Olaoluwa Osuntokun 2019-08-05 21:36:15 -07:00
parent 653d557fec
commit b1aea41d20
No known key found for this signature in database
GPG Key ID: CE58F7F8E20FD9A2

@ -4013,13 +4013,15 @@ func testMultiHopPayments(net *lntest.NetworkHarness, t *harnessTest) {
} }
// As preliminary setup, we'll create two new nodes: Carol and Dave, // As preliminary setup, we'll create two new nodes: Carol and Dave,
// such that we now have a 4 ndoe, 3 channel topology. Dave will make // such that we now have a 4 node, 3 channel topology. Dave will make a
// a channel with Alice, and Carol with Dave. After this setup, the // channel with Alice, and Carol with Dave. After this setup, the
// network topology should now look like: // network topology should now look like:
// Carol -> Dave -> Alice -> Bob // Carol -> Dave -> Alice -> Bob
// //
// First, we'll create Dave and establish a channel to Alice. // First, we'll create Dave and establish a channel to Alice. Dave will
dave, err := net.NewNode("Dave", nil) // be running an older node that requires the legacy onion payload.
daveArgs := []string{"--legacyprotocol.onion"}
dave, err := net.NewNode("Dave", daveArgs)
if err != nil { if err != nil {
t.Fatalf("unable to create new nodes: %v", err) t.Fatalf("unable to create new nodes: %v", err)
} }