Skip to content

Commit da8e49f

Browse files
committed
lightningd: wait interface for htlcs indexes.
Note that documentation says invoice expiries can batch, but that's no longer true, so delete it. Usually, we miss a number because the change is too fast. This adds the wait interface, but it doesn't actually fire until the next commit, which wires it into the db code. Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: JSON-RPC: `wait` now supports the `htlcs` (`listhtlcs`) subsystem.
1 parent 8b6bc9c commit da8e49f

File tree

12 files changed

+1038
-429
lines changed

12 files changed

+1038
-429
lines changed

.msggen.json

+69
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,32 @@
501501
"offered": 0,
502502
"settled": 1
503503
},
504+
"WaitHtlcsDirection": {
505+
"in": 1,
506+
"out": 0
507+
},
508+
"WaitHtlcsState": {
509+
"RCVD_ADD_ACK_COMMIT": 3,
510+
"RCVD_ADD_ACK_REVOCATION": 14,
511+
"RCVD_ADD_COMMIT": 11,
512+
"RCVD_ADD_HTLC": 10,
513+
"RCVD_ADD_REVOCATION": 2,
514+
"RCVD_REMOVE_ACK_COMMIT": 18,
515+
"RCVD_REMOVE_ACK_REVOCATION": 9,
516+
"RCVD_REMOVE_COMMIT": 6,
517+
"RCVD_REMOVE_HTLC": 5,
518+
"RCVD_REMOVE_REVOCATION": 17,
519+
"SENT_ADD_ACK_COMMIT": 13,
520+
"SENT_ADD_ACK_REVOCATION": 4,
521+
"SENT_ADD_COMMIT": 1,
522+
"SENT_ADD_HTLC": 0,
523+
"SENT_ADD_REVOCATION": 12,
524+
"SENT_REMOVE_ACK_COMMIT": 8,
525+
"SENT_REMOVE_ACK_REVOCATION": 19,
526+
"SENT_REMOVE_COMMIT": 16,
527+
"SENT_REMOVE_HTLC": 15,
528+
"SENT_REMOVE_REVOCATION": 7
529+
},
504530
"WaitIndexname": {
505531
"created": 0,
506532
"deleted": 2,
@@ -518,6 +544,7 @@
518544
},
519545
"WaitSubsystem": {
520546
"forwards": 1,
547+
"htlcs": 3,
521548
"invoices": 0,
522549
"sendpays": 2
523550
},
@@ -3671,6 +3698,15 @@
36713698
"Wait.forwards.out_channel": 5,
36723699
"Wait.forwards.status": 1
36733700
},
3701+
"WaitHtlcs": {
3702+
"Wait.htlcs.amount_msat": 5,
3703+
"Wait.htlcs.cltv_expiry": 4,
3704+
"Wait.htlcs.direction": 6,
3705+
"Wait.htlcs.htlc_id": 2,
3706+
"Wait.htlcs.payment_hash": 7,
3707+
"Wait.htlcs.short_channel_id": 3,
3708+
"Wait.htlcs.state": 1
3709+
},
36743710
"WaitInvoices": {
36753711
"Wait.invoices.bolt11": 4,
36763712
"Wait.invoices.bolt12": 5,
@@ -3688,6 +3724,7 @@
36883724
"Wait.deleted": 4,
36893725
"Wait.details": 5,
36903726
"Wait.forwards": 7,
3727+
"Wait.htlcs": 9,
36913728
"Wait.invoices": 6,
36923729
"Wait.sendpays": 8,
36933730
"Wait.subsystem": 1,
@@ -12805,6 +12842,38 @@
1280512842
"added": "v25.05",
1280612843
"deprecated": null
1280712844
},
12845+
"Wait.htlcs": {
12846+
"added": "v25.05",
12847+
"deprecated": null
12848+
},
12849+
"Wait.htlcs.amount_msat": {
12850+
"added": "v25.05",
12851+
"deprecated": null
12852+
},
12853+
"Wait.htlcs.cltv_expiry": {
12854+
"added": "v25.05",
12855+
"deprecated": null
12856+
},
12857+
"Wait.htlcs.direction": {
12858+
"added": "v25.05",
12859+
"deprecated": null
12860+
},
12861+
"Wait.htlcs.htlc_id": {
12862+
"added": "v25.05",
12863+
"deprecated": null
12864+
},
12865+
"Wait.htlcs.payment_hash": {
12866+
"added": "v25.05",
12867+
"deprecated": null
12868+
},
12869+
"Wait.htlcs.short_channel_id": {
12870+
"added": "v25.05",
12871+
"deprecated": null
12872+
},
12873+
"Wait.htlcs.state": {
12874+
"added": "v25.05",
12875+
"deprecated": null
12876+
},
1280812877
"Wait.indexname": {
1280912878
"added": "pre-v0.10.1",
1281012879
"deprecated": null

cln-grpc/proto/node.proto

+41
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cln-grpc/src/convert.rs

+16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)