channeldb+invoices: fix what pending invoice means in ChannelDB
This commits builds on top of PR #3694 to further clarify invoice state by defining pending invoices as the ones which are not settled or canceled. Automatic cancellation of expired invoices makes this possbile. While this change only directly affects ChannelDB, users of the listinvoices RPC will receive actual pending invoices when pending_only flag is set.
This commit is contained in:
1 parent
9b60685961
commit
fa14ff67ad
5 files changed
+113
-25
No files matched your search
+3
-1
@@ -7556,7 +7556,9 @@ func (m *PaymentHash) GetRHash() []byte {
|
||||
}
|
||||
|
||||
type ListInvoiceRequest struct {
|
||||
/// If set, only unsettled invoices will be returned in the response.
|
||||
//*
|
||||
//If set, only invoices that are not settled and not canceled will be returned
|
||||
//in the response.
|
||||
PendingOnly bool `protobuf:"varint,1,opt,name=pending_only,proto3" json:"pending_only,omitempty"`
|
||||
//*
|
||||
//The index of an invoice that will be used as either the start or end of a
|
||||
|
||||
+4
-1
@@ -2450,7 +2450,10 @@ message PaymentHash {
|
||||
}
|
||||
|
||||
message ListInvoiceRequest {
|
||||
/// If set, only unsettled invoices will be returned in the response.
|
||||
/**
|
||||
If set, only invoices that are not settled and not canceled will be returned
|
||||
in the response.
|
||||
*/
|
||||
bool pending_only = 1 [json_name = "pending_only"];
|
||||
|
||||
/**
|
||||
|
||||
@@ -896,7 +896,7 @@
|
||||
"parameters": [
|
||||
{
|
||||
"name": "pending_only",
|
||||
"description": "/ If set, only unsettled invoices will be returned in the response.",
|
||||
"description": "*\nIf set, only invoices that are not settled and not canceled will be returned\nin the response.",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "boolean",
|
||||
|
||||
Reference in new issue
Block a user