mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
lnrpc: cancelable sendpayment request
This commit is contained in:
parent
06bff6f81a
commit
e729084149
@ -492,6 +492,12 @@ type SendPaymentRequest struct {
|
||||
// The time preference for this payment. Set to -1 to optimize for fees
|
||||
// only, to 1 to optimize for reliability only or a value inbetween for a mix.
|
||||
TimePref float64 `protobuf:"fixed64,23,opt,name=time_pref,json=timePref,proto3" json:"time_pref,omitempty"`
|
||||
// If set, the payment loop can be interrupted by manually canceling the
|
||||
// payment context, even before the payment timeout is reached. Note that the
|
||||
// payment may still succeed after cancellation, as in-flight attempts can
|
||||
// still settle afterwards. Canceling will only prevent further attempts from
|
||||
// being sent.
|
||||
Cancelable bool `protobuf:"varint,24,opt,name=cancelable,proto3" json:"cancelable,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SendPaymentRequest) Reset() {
|
||||
@ -688,6 +694,13 @@ func (x *SendPaymentRequest) GetTimePref() float64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SendPaymentRequest) GetCancelable() bool {
|
||||
if x != nil {
|
||||
return x.Cancelable
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type TrackPaymentRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -3339,7 +3352,7 @@ var file_routerrpc_router_proto_rawDesc = []byte{
|
||||
0x0a, 0x16, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x6f, 0x75, 0x74,
|
||||
0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72,
|
||||
0x72, 0x70, 0x63, 0x1a, 0x0f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf4, 0x07, 0x0a, 0x12, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x08, 0x0a, 0x12, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64,
|
||||
0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x65, 0x73, 0x74, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x61, 0x6d, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x61, 0x6d,
|
||||
@ -3398,7 +3411,9 @@ var file_routerrpc_router_proto_rawDesc = []byte{
|
||||
0x7a, 0x65, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6d, 0x70, 0x18, 0x16, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6d, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x5f, 0x70, 0x72, 0x65, 0x66, 0x18, 0x17, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x50, 0x72, 0x65, 0x66, 0x1a, 0x44, 0x0a, 0x16, 0x44, 0x65, 0x73, 0x74, 0x43, 0x75, 0x73,
|
||||
0x65, 0x50, 0x72, 0x65, 0x66, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x61,
|
||||
0x62, 0x6c, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x63, 0x61, 0x6e, 0x63, 0x65,
|
||||
0x6c, 0x61, 0x62, 0x6c, 0x65, 0x1a, 0x44, 0x0a, 0x16, 0x44, 0x65, 0x73, 0x74, 0x43, 0x75, 0x73,
|
||||
0x74, 0x6f, 0x6d, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
|
||||
|
@ -330,6 +330,15 @@ message SendPaymentRequest {
|
||||
only, to 1 to optimize for reliability only or a value inbetween for a mix.
|
||||
*/
|
||||
double time_pref = 23;
|
||||
|
||||
/*
|
||||
If set, the payment loop can be interrupted by manually canceling the
|
||||
payment context, even before the payment timeout is reached. Note that the
|
||||
payment may still succeed after cancellation, as in-flight attempts can
|
||||
still settle afterwards. Canceling will only prevent further attempts from
|
||||
being sent.
|
||||
*/
|
||||
bool cancelable = 24;
|
||||
}
|
||||
|
||||
message TrackPaymentRequest {
|
||||
|
@ -1804,6 +1804,10 @@
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"description": "The time preference for this payment. Set to -1 to optimize for fees\nonly, to 1 to optimize for reliability only or a value inbetween for a mix."
|
||||
},
|
||||
"cancelable": {
|
||||
"type": "boolean",
|
||||
"description": "If set, the payment loop can be interrupted by manually canceling the\npayment context, even before the payment timeout is reached. Note that the\npayment may still succeed after cancellation, as in-flight attempts can\nstill settle afterwards. Canceling will only prevent further attempts from\nbeing sent."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user