Skip to content

Commit

Permalink
lightningd: expose created_index and updated_index fields.
Browse files Browse the repository at this point in the history
If you miss a wait event, you can catch up by doing listinvoices and
getting the max of these fields.  It's also a good debugging clue.

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Jul 6, 2023
1 parent b2b6202 commit c3f2480
Show file tree
Hide file tree
Showing 27 changed files with 559 additions and 325 deletions.
58 changes: 54 additions & 4 deletions .msggen.json
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@
"CreateInvoice.amount_received_msat": 10,
"CreateInvoice.bolt11": 2,
"CreateInvoice.bolt12": 3,
"CreateInvoice.created_index": 16,
"CreateInvoice.description": 7,
"CreateInvoice.expires_at": 8,
"CreateInvoice.invreq_payer_note": 15,
Expand Down Expand Up @@ -573,14 +574,16 @@
"DelInvoice.amount_msat": 4,
"DelInvoice.bolt11": 2,
"DelInvoice.bolt12": 3,
"DelInvoice.created_index": 12,
"DelInvoice.description": 5,
"DelInvoice.expires_at": 8,
"DelInvoice.invreq_payer_note": 11,
"DelInvoice.label": 1,
"DelInvoice.local_offer_id": 9,
"DelInvoice.payer_note": 10,
"DelInvoice.payment_hash": 6,
"DelInvoice.status": 7
"DelInvoice.status": 7,
"DelInvoice.updated_index": 13
},
"DisconnectRequest": {
"Disconnect.force": 2,
Expand Down Expand Up @@ -763,6 +766,7 @@
},
"InvoiceResponse": {
"Invoice.bolt11": 1,
"Invoice.created_index": 10,
"Invoice.expires_at": 4,
"Invoice.payment_hash": 2,
"Invoice.payment_secret": 3,
Expand Down Expand Up @@ -925,6 +929,7 @@
"ListInvoices.invoices[].amount_received_msat": 12,
"ListInvoices.invoices[].bolt11": 7,
"ListInvoices.invoices[].bolt12": 8,
"ListInvoices.invoices[].created_index": 16,
"ListInvoices.invoices[].description": 2,
"ListInvoices.invoices[].expires_at": 5,
"ListInvoices.invoices[].invreq_payer_note": 15,
Expand All @@ -935,7 +940,8 @@
"ListInvoices.invoices[].payer_note": 10,
"ListInvoices.invoices[].payment_hash": 3,
"ListInvoices.invoices[].payment_preimage": 14,
"ListInvoices.invoices[].status": 4
"ListInvoices.invoices[].status": 4,
"ListInvoices.invoices[].updated_index": 17
},
"ListinvoicesRequest": {
"ListInvoices.index": 5,
Expand Down Expand Up @@ -1508,14 +1514,16 @@
"WaitAnyInvoice.amount_received_msat": 10,
"WaitAnyInvoice.bolt11": 7,
"WaitAnyInvoice.bolt12": 8,
"WaitAnyInvoice.created_index": 13,
"WaitAnyInvoice.description": 2,
"WaitAnyInvoice.expires_at": 5,
"WaitAnyInvoice.label": 1,
"WaitAnyInvoice.paid_at": 11,
"WaitAnyInvoice.pay_index": 9,
"WaitAnyInvoice.payment_hash": 3,
"WaitAnyInvoice.payment_preimage": 12,
"WaitAnyInvoice.status": 4
"WaitAnyInvoice.status": 4,
"WaitAnyInvoice.updated_index": 14
},
"WaitinvoiceRequest": {
"WaitInvoice.label": 1
Expand All @@ -1525,14 +1533,16 @@
"WaitInvoice.amount_received_msat": 10,
"WaitInvoice.bolt11": 7,
"WaitInvoice.bolt12": 8,
"WaitInvoice.created_index": 13,
"WaitInvoice.description": 2,
"WaitInvoice.expires_at": 5,
"WaitInvoice.label": 1,
"WaitInvoice.paid_at": 11,
"WaitInvoice.pay_index": 9,
"WaitInvoice.payment_hash": 3,
"WaitInvoice.payment_preimage": 12,
"WaitInvoice.status": 4
"WaitInvoice.status": 4,
"WaitInvoice.updated_index": 14
},
"WaitsendpayRequest": {
"WaitSendPay.groupid": 4,
Expand Down Expand Up @@ -1722,6 +1732,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"CreateInvoice.created_index": {
"added": "v23.08",
"deprecated": false
},
"CreateInvoice.description": {
"added": "pre-v0.10.1",
"deprecated": false
Expand Down Expand Up @@ -2478,6 +2492,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"DelInvoice.created_index": {
"added": "v23.08",
"deprecated": false
},
"DelInvoice.desconly": {
"added": "pre-v0.10.1",
"deprecated": false
Expand Down Expand Up @@ -2510,6 +2528,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"DelInvoice.updated_index": {
"added": "v23.08",
"deprecated": false
},
"Disconnect": {
"added": "pre-v0.10.1",
"deprecated": null
Expand Down Expand Up @@ -3034,6 +3056,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"Invoice.created_index": {
"added": "v23.08",
"deprecated": false
},
"Invoice.deschashonly": {
"added": "pre-v0.10.1",
"deprecated": false
Expand Down Expand Up @@ -3574,6 +3600,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"ListInvoices.invoices[].created_index": {
"added": "v23.08",
"deprecated": false
},
"ListInvoices.invoices[].description": {
"added": "pre-v0.10.1",
"deprecated": false
Expand Down Expand Up @@ -3614,6 +3644,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"ListInvoices.invoices[].updated_index": {
"added": "v23.08",
"deprecated": false
},
"ListInvoices.invstring": {
"added": "pre-v0.10.1",
"deprecated": false
Expand Down Expand Up @@ -5294,6 +5328,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"WaitAnyInvoice.created_index": {
"added": "v23.08",
"deprecated": false
},
"WaitAnyInvoice.description": {
"added": "pre-v0.10.1",
"deprecated": false
Expand Down Expand Up @@ -5334,6 +5372,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"WaitAnyInvoice.updated_index": {
"added": "v23.08",
"deprecated": false
},
"WaitInvoice": {
"added": "pre-v0.10.1",
"deprecated": null
Expand All @@ -5354,6 +5396,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"WaitInvoice.created_index": {
"added": "v23.08",
"deprecated": false
},
"WaitInvoice.description": {
"added": "pre-v0.10.1",
"deprecated": false
Expand Down Expand Up @@ -5386,6 +5432,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"WaitInvoice.updated_index": {
"added": "v23.08",
"deprecated": false
},
"WaitSendPay": {
"added": "pre-v0.10.1",
"deprecated": null
Expand Down
10 changes: 10 additions & 0 deletions cln-grpc/proto/node.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions cln-grpc/src/convert.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions cln-rpc/src/model.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c3f2480

Please sign in to comment.