mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-20 15:24:23 +01:00
always return incorrect details on probes
This commit is contained in:
@@ -75,15 +75,9 @@ func intercept(reqPaymentHash []byte, reqOutgoingAmountMsat uint64, reqOutgoingE
|
||||
}, nil
|
||||
}
|
||||
} else { //probing
|
||||
failureCode := FAILURE_TEMPORARY_CHANNEL_FAILURE
|
||||
isConnected, _ := client.IsConnected(destination)
|
||||
if isConnected {
|
||||
failureCode = FAILURE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS
|
||||
}
|
||||
|
||||
return interceptResult{
|
||||
action: INTERCEPT_FAIL_HTLC_WITH_CODE,
|
||||
failureCode: failureCode,
|
||||
failureCode: FAILURE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS,
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,5 +70,5 @@ func testProbing(p *testParams) {
|
||||
_, err = alice.PayViaRoute(outerAmountMsat, fakePaymentHash, outerInvoice.paymentSecret, route)
|
||||
|
||||
// Expect temporary channel failure if the peer is offline
|
||||
assert.Contains(p.t, err.Error(), "WIRE_TEMPORARY_CHANNEL_FAILURE")
|
||||
assert.Contains(p.t, err.Error(), "WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user