Skip to content

Commit db104aa

Browse files
committed
lightningd: improve wait API by making details fields per-subsystem.
It makes the schema simpler, and indeed, expressable by GRPC. Changelog-Added: JSON-RPC: `wait` now has separate `invoices`, `forwards` and `sendpays` objects for each subsystem. Changelog-Deprecated: JSON-RPC: `wait` reply `details` object: use subsytem specific object instead. Signed-off-by: Rusty Russell <[email protected]>
1 parent f7f5696 commit db104aa

File tree

13 files changed

+1202
-469
lines changed

13 files changed

+1202
-469
lines changed

.msggen.json

Lines changed: 108 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,11 +495,27 @@
495495
"settled": 7,
496496
"unpaid": 0
497497
},
498+
"WaitForwardsStatus": {
499+
"failed": 2,
500+
"local_failed": 3,
501+
"offered": 0,
502+
"settled": 1
503+
},
498504
"WaitIndexname": {
499505
"created": 0,
500506
"deleted": 2,
501507
"updated": 1
502508
},
509+
"WaitInvoicesStatus": {
510+
"expired": 2,
511+
"paid": 1,
512+
"unpaid": 0
513+
},
514+
"WaitSendpaysStatus": {
515+
"complete": 2,
516+
"failed": 1,
517+
"pending": 0
518+
},
503519
"WaitSubsystem": {
504520
"forwards": 1,
505521
"invoices": 0,
@@ -3649,6 +3665,20 @@
36493665
"Wait.details.payment_hash": 8,
36503666
"Wait.details.status": 1
36513667
},
3668+
"WaitForwards": {
3669+
"Wait.forwards.in_channel": 2,
3670+
"Wait.forwards.in_htlc_id": 3,
3671+
"Wait.forwards.in_msat": 4,
3672+
"Wait.forwards.out_channel": 5,
3673+
"Wait.forwards.status": 1
3674+
},
3675+
"WaitInvoices": {
3676+
"Wait.invoices.bolt11": 4,
3677+
"Wait.invoices.bolt12": 5,
3678+
"Wait.invoices.description": 3,
3679+
"Wait.invoices.label": 2,
3680+
"Wait.invoices.status": 1
3681+
},
36523682
"WaitRequest": {
36533683
"Wait.indexname": 2,
36543684
"Wait.nextvalue": 3,
@@ -3658,9 +3688,18 @@
36583688
"Wait.created": 2,
36593689
"Wait.deleted": 4,
36603690
"Wait.details": 5,
3691+
"Wait.forwards": 6,
3692+
"Wait.invoices": 7,
3693+
"Wait.sendpays": 8,
36613694
"Wait.subsystem": 1,
36623695
"Wait.updated": 3
36633696
},
3697+
"WaitSendpays": {
3698+
"Wait.sendpays.groupid": 3,
3699+
"Wait.sendpays.partid": 2,
3700+
"Wait.sendpays.payment_hash": 4,
3701+
"Wait.sendpays.status": 1
3702+
},
36643703
"WaitanyinvoicePaidOutpoint": {
36653704
"WaitAnyInvoice.paid_outpoint.outnum": 2,
36663705
"WaitAnyInvoice.paid_outpoint.txid": 1
@@ -12697,7 +12736,7 @@
1269712736
},
1269812737
"Wait.details": {
1269912738
"added": "pre-v0.10.1",
12700-
"deprecated": null
12739+
"deprecated": "v25.05"
1270112740
},
1270212741
"Wait.details.bolt11": {
1270312742
"added": "pre-v0.10.1",
@@ -12747,14 +12786,82 @@
1274712786
"added": "pre-v0.10.1",
1274812787
"deprecated": null
1274912788
},
12789+
"Wait.forwards": {
12790+
"added": "v25.05",
12791+
"deprecated": null
12792+
},
12793+
"Wait.forwards.in_channel": {
12794+
"added": "v25.05",
12795+
"deprecated": null
12796+
},
12797+
"Wait.forwards.in_htlc_id": {
12798+
"added": "v25.05",
12799+
"deprecated": null
12800+
},
12801+
"Wait.forwards.in_msat": {
12802+
"added": "v25.05",
12803+
"deprecated": null
12804+
},
12805+
"Wait.forwards.out_channel": {
12806+
"added": "v25.05",
12807+
"deprecated": null
12808+
},
12809+
"Wait.forwards.status": {
12810+
"added": "v25.05",
12811+
"deprecated": null
12812+
},
1275012813
"Wait.indexname": {
1275112814
"added": "pre-v0.10.1",
1275212815
"deprecated": null
1275312816
},
12817+
"Wait.invoices": {
12818+
"added": "v25.05",
12819+
"deprecated": null
12820+
},
12821+
"Wait.invoices.bolt11": {
12822+
"added": "v25.05",
12823+
"deprecated": null
12824+
},
12825+
"Wait.invoices.bolt12": {
12826+
"added": "v25.05",
12827+
"deprecated": null
12828+
},
12829+
"Wait.invoices.description": {
12830+
"added": "v25.05",
12831+
"deprecated": null
12832+
},
12833+
"Wait.invoices.label": {
12834+
"added": "v25.05",
12835+
"deprecated": null
12836+
},
12837+
"Wait.invoices.status": {
12838+
"added": "v25.05",
12839+
"deprecated": null
12840+
},
1275412841
"Wait.nextvalue": {
1275512842
"added": "pre-v0.10.1",
1275612843
"deprecated": null
1275712844
},
12845+
"Wait.sendpays": {
12846+
"added": "v25.05",
12847+
"deprecated": null
12848+
},
12849+
"Wait.sendpays.groupid": {
12850+
"added": "v25.05",
12851+
"deprecated": null
12852+
},
12853+
"Wait.sendpays.partid": {
12854+
"added": "v25.05",
12855+
"deprecated": null
12856+
},
12857+
"Wait.sendpays.payment_hash": {
12858+
"added": "v25.05",
12859+
"deprecated": null
12860+
},
12861+
"Wait.sendpays.status": {
12862+
"added": "v25.05",
12863+
"deprecated": null
12864+
},
1275812865
"Wait.subsystem": {
1275912866
"added": "pre-v0.10.1",
1276012867
"deprecated": null

cln-grpc/proto/node.proto

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cln-grpc/src/convert.rs

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)