test: update itest to no longer expect incorrect message for sphinx replay test

In this commit, we update the itests to expect the correct message for
the sphinx replay test. Before the fixes in the prior commits, we
expected the wrong error since we were actually unable to decrypt these
converted malformed HTLC errors. Now, we'll properly return a parse able
error, so we assert against that error instead of the failure to decode
an error.
This commit is contained in:
Olaoluwa Osuntokun 2019-04-30 18:30:24 -07:00
parent 56c969c911
commit 2f2a907b58
No known key found for this signature in database
GPG Key ID: CE58F7F8E20FD9A2

@ -3522,13 +3522,10 @@ func testSphinxReplayPersistence(net *lntest.NetworkHarness, t *harnessTest) {
// Construct the response we expect after sending a duplicate packet
// that fails due to sphinx replay detection.
replayErr := fmt.Sprintf("unable to route payment to destination: "+
"TemporaryChannelFailure: unable to de-obfuscate onion failure, "+
"htlc with hash(%x): unable to retrieve onion failure",
invoiceResp.RHash)
if resp.PaymentError != replayErr {
t.Fatalf("received payment error: %v", resp.PaymentError)
replayErr := "TemporaryChannelFailure"
if !strings.Contains(resp.PaymentError, replayErr) {
t.Fatalf("received payment error: %v, expected %v",
resp.PaymentError, replayErr)
}
// Since the payment failed, the balance should still be left