routing/pathfind: ensure final hop supports payment addrs
This commit adds an optional PaymentAddr field to the RestrictParams, so that we can verify the final hop can support it before doing an expensive round of pathfindig.
This commit is contained in:
3 files changed
+88
-1
No files matched your search
@@ -192,7 +192,11 @@ func (p *paymentLifecycle) resumePayment() ([32]byte, *route.Route, error) {
|
||||
// payment-level failure.
|
||||
func errorToPaymentFailure(err error) channeldb.FailureReason {
|
||||
switch err {
|
||||
case errNoTlvPayload, errNoPathFound, errMaxHopsExceeded,
|
||||
case
|
||||
errNoTlvPayload,
|
||||
errNoPaymentAddr,
|
||||
errNoPathFound,
|
||||
errMaxHopsExceeded,
|
||||
errPrebuiltRouteTried:
|
||||
|
||||
return channeldb.FailureReasonNoRoute
|
||||
|
||||
Reference in new issue
Block a user