routerrpc: convert sendpayment to async
Modify the routerrpc SendPayment api to asynchronous. This allows callers to pick up a payment after the rpc connection was lost or lnd was restarted.
This commit is contained in:
8 files changed
+571
-239
No files matched your search
@@ -97,6 +97,18 @@ const (
|
||||
// TODO(halseth): cancel state.
|
||||
)
|
||||
|
||||
// String returns a human readable FailureReason
|
||||
func (r FailureReason) String() string {
|
||||
switch r {
|
||||
case FailureReasonTimeout:
|
||||
return "timeout"
|
||||
case FailureReasonNoRoute:
|
||||
return "no_route"
|
||||
}
|
||||
|
||||
return "unknown"
|
||||
}
|
||||
|
||||
// PaymentStatus represent current status of payment
|
||||
type PaymentStatus byte
|
||||
|
||||
|
||||
Reference in new issue
Block a user