multi: rename FailUnknownPaymentHash to FailIncorrectDetails

Align naming better with the lightning spec. Not the full name of the
failure (FailIncorrectOrUnknownPaymentDetails) is used, because this
would cause too many long lines in the code.
This commit is contained in:
Joost Jager committed 2019-08-08 11:04:17 +02:00
1 parent 8681729561
commit aabd68ebcd
11 files changed
+219 -214

No files matched your search

+4 -3
View File
@@ -1803,7 +1803,7 @@ func TestSwitchSendPayment(t *testing.T) {
// the add htlc request with error and sent the htlc fail request
// back. This request should be forwarded back to alice channel link.
obfuscator := NewMockObfuscator()
failure := lnwire.NewFailUnknownPaymentHash(update.Amount)
failure := lnwire.NewFailIncorrectDetails(update.Amount)
reason, err := obfuscator.EncryptFirstHop(failure)
if err != nil {
t.Fatalf("unable obfuscate failure: %v", err)
@@ -1824,8 +1824,9 @@ func TestSwitchSendPayment(t *testing.T) {
select {
case err := <-errChan:
assertFailureCode(t, err, lnwire.CodeUnknownPaymentHash)
assertFailureCode(
t, err, lnwire.CodeIncorrectOrUnknownPaymentDetails,
)
case <-time.After(time.Second):
t.Fatal("err wasn't received")
}