Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wait/pagination support for listsendpays, listforwards #6753

Merged
merged 18 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
9a7d0db
sendpays: add to wait subsystem.
rustyrussell Oct 27, 2023
ecf7ceb
db: initialize variable to hold max payments id.
rustyrussell Oct 27, 2023
4f394fc
sendpays: hook into the wait subsystem.
rustyrussell Oct 28, 2023
1c41d71
wallet: remove premature optimization when making payment.
rustyrussell Oct 28, 2023
2b7c3e1
wallet: don't expose wallet_payment constructor, use wallet_add_payment.
rustyrussell Oct 28, 2023
1d89154
lightningd: rename struct sendpay_command to waitsendpay_command.
rustyrussell Oct 28, 2023
f6de9e7
wallet: use standard-style iterators for payments.
rustyrussell Oct 28, 2023
88397ef
lightningd: don't log that we're trying to pay if we're not.
rustyrussell Oct 28, 2023
68672c6
listsendpays: add created_index and updated_index fields.
rustyrussell Oct 28, 2023
78afee5
lightningd: add ordering and pagination to listsendpays.
rustyrussell Oct 28, 2023
2bfae25
lightningd: split up peer_htlcs a little, create forwards.c
rustyrussell Oct 28, 2023
6c5dc9d
lightningd: hook forwards into the wait system.
rustyrussell Oct 28, 2023
bcbbcb3
forwards: hook into the wait subsystem.
rustyrussell Oct 28, 2023
b1467a1
listforwards: add created_index and updated_index fields.
rustyrussell Oct 28, 2023
4a074fc
lightningd: add ordering and pagination to listforwards.
rustyrussell Oct 28, 2023
e0354ab
pytest: add test for wait forwards.
rustyrussell Oct 28, 2023
ae06f35
wait forwards: add in_htlc_id
rustyrussell Oct 28, 2023
feb9221
doc: document wait for new subsystems, add request & response schemas.
rustyrussell Oct 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 93 additions & 5 deletions .msggen.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@
"legacy": 0,
"tlv": 1
},
"ListforwardsIndex": {
"created": 0,
"updated": 1
},
"ListforwardsStatus": {
"failed": 3,
"local_failed": 2,
Expand Down Expand Up @@ -269,6 +273,10 @@
"SKIPPED": 0,
"UNUSUAL": 2
},
"ListsendpaysIndex": {
"created": 0,
"updated": 1
},
"ListsendpaysPaymentsStatus": {
"complete": 2,
"failed": 1,
Expand Down Expand Up @@ -920,6 +928,7 @@
"ListDatastore.datastore[]": 1
},
"ListforwardsForwards": {
"ListForwards.forwards[].created_index": 12,
"ListForwards.forwards[].fee_msat": 7,
"ListForwards.forwards[].in_channel": 1,
"ListForwards.forwards[].in_htlc_id": 10,
Expand All @@ -930,11 +939,15 @@
"ListForwards.forwards[].payment_hash": 6,
"ListForwards.forwards[].received_time": 4,
"ListForwards.forwards[].status": 3,
"ListForwards.forwards[].style": 9
"ListForwards.forwards[].style": 9,
"ListForwards.forwards[].updated_index": 13
},
"ListforwardsRequest": {
"ListForwards.in_channel": 2,
"ListForwards.index": 4,
"ListForwards.limit": 6,
"ListForwards.out_channel": 3,
"ListForwards.start": 5,
"ListForwards.status": 1
},
"ListforwardsResponse": {
Expand Down Expand Up @@ -1290,6 +1303,7 @@
"ListSendPays.payments[].bolt11": 10,
"ListSendPays.payments[].bolt12": 11,
"ListSendPays.payments[].created_at": 7,
"ListSendPays.payments[].created_index": 16,
"ListSendPays.payments[].description": 14,
"ListSendPays.payments[].destination": 6,
"ListSendPays.payments[].erroronion": 13,
Expand All @@ -1299,11 +1313,15 @@
"ListSendPays.payments[].partid": 15,
"ListSendPays.payments[].payment_hash": 3,
"ListSendPays.payments[].payment_preimage": 12,
"ListSendPays.payments[].status": 4
"ListSendPays.payments[].status": 4,
"ListSendPays.payments[].updated_index": 17
},
"ListsendpaysRequest": {
"ListSendPays.bolt11": 1,
"ListSendPays.index": 4,
"ListSendPays.limit": 6,
"ListSendPays.payment_hash": 2,
"ListSendPays.start": 5,
"ListSendPays.status": 3
},
"ListsendpaysResponse": {
Expand Down Expand Up @@ -1423,14 +1441,16 @@
"SendOnion.bolt11": 9,
"SendOnion.bolt12": 10,
"SendOnion.created_at": 6,
"SendOnion.created_index": 14,
"SendOnion.destination": 5,
"SendOnion.id": 1,
"SendOnion.label": 8,
"SendOnion.message": 12,
"SendOnion.partid": 13,
"SendOnion.payment_hash": 2,
"SendOnion.payment_preimage": 11,
"SendOnion.status": 3
"SendOnion.status": 3,
"SendOnion.updated_index": 15
},
"SendpayRequest": {
"SendPay.amount_msat": 10,
Expand All @@ -1452,6 +1472,7 @@
"SendPay.bolt12": 12,
"SendPay.completed_at": 15,
"SendPay.created_at": 7,
"SendPay.created_index": 16,
"SendPay.destination": 6,
"SendPay.groupid": 2,
"SendPay.id": 1,
Expand All @@ -1460,7 +1481,8 @@
"SendPay.partid": 10,
"SendPay.payment_hash": 3,
"SendPay.payment_preimage": 13,
"SendPay.status": 4
"SendPay.status": 4,
"SendPay.updated_index": 17
},
"SendpayRoute": {
"SendPay.route[].amount_msat": 5,
Expand Down Expand Up @@ -1648,14 +1670,16 @@
"WaitSendPay.bolt12": 12,
"WaitSendPay.completed_at": 14,
"WaitSendPay.created_at": 7,
"WaitSendPay.created_index": 15,
"WaitSendPay.destination": 6,
"WaitSendPay.groupid": 2,
"WaitSendPay.id": 1,
"WaitSendPay.label": 9,
"WaitSendPay.partid": 10,
"WaitSendPay.payment_hash": 3,
"WaitSendPay.payment_preimage": 13,
"WaitSendPay.status": 4
"WaitSendPay.status": 4,
"WaitSendPay.updated_index": 16
},
"WithdrawRequest": {
"Withdraw.destination": 1,
Expand Down Expand Up @@ -3555,6 +3579,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"ListForwards.forwards[].created_index": {
"added": "v23.11",
"deprecated": false
},
"ListForwards.forwards[].fee_msat": {
"added": "pre-v0.10.1",
"deprecated": false
Expand Down Expand Up @@ -3595,14 +3623,30 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"ListForwards.forwards[].updated_index": {
"added": "v23.11",
"deprecated": false
},
"ListForwards.in_channel": {
"added": "pre-v0.10.1",
"deprecated": false
},
"ListForwards.index": {
"added": "v23.11",
"deprecated": false
},
"ListForwards.limit": {
"added": "v23.11",
"deprecated": false
},
"ListForwards.out_channel": {
"added": "pre-v0.10.1",
"deprecated": false
},
"ListForwards.start": {
"added": "v23.11",
"deprecated": false
},
"ListForwards.status": {
"added": "pre-v0.10.1",
"deprecated": false
Expand Down Expand Up @@ -4731,6 +4775,14 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"ListSendPays.index": {
"added": "v23.11",
"deprecated": false
},
"ListSendPays.limit": {
"added": "v23.11",
"deprecated": false
},
"ListSendPays.payment_hash": {
"added": "pre-v0.10.1",
"deprecated": false
Expand Down Expand Up @@ -4759,6 +4811,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"ListSendPays.payments[].created_index": {
"added": "v23.11",
"deprecated": false
},
"ListSendPays.payments[].description": {
"added": "pre-v0.10.1",
"deprecated": false
Expand Down Expand Up @@ -4799,6 +4855,14 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"ListSendPays.payments[].updated_index": {
"added": "v23.11",
"deprecated": false
},
"ListSendPays.start": {
"added": "v23.11",
"deprecated": false
},
"ListSendPays.status": {
"added": "pre-v0.10.1",
"deprecated": false
Expand Down Expand Up @@ -5071,6 +5135,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"SendOnion.created_index": {
"added": "v23.11",
"deprecated": false
},
"SendOnion.destination": {
"added": "pre-v0.10.1",
"deprecated": false
Expand Down Expand Up @@ -5135,6 +5203,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"SendOnion.updated_index": {
"added": "v23.11",
"deprecated": false
},
"SendPay": {
"added": "pre-v0.10.1",
"deprecated": null
Expand Down Expand Up @@ -5163,6 +5235,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"SendPay.created_index": {
"added": "v23.11",
"deprecated": false
},
"SendPay.destination": {
"added": "pre-v0.10.1",
"deprecated": false
Expand Down Expand Up @@ -5227,6 +5303,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"SendPay.updated_index": {
"added": "v23.11",
"deprecated": false
},
"SendPsbt": {
"added": "pre-v0.10.1",
"deprecated": null
Expand Down Expand Up @@ -5723,6 +5803,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"WaitSendPay.created_index": {
"added": "v23.11",
"deprecated": false
},
"WaitSendPay.destination": {
"added": "pre-v0.10.1",
"deprecated": false
Expand Down Expand Up @@ -5759,6 +5843,10 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"WaitSendPay.updated_index": {
"added": "v23.11",
"deprecated": false
},
"Withdraw": {
"added": "pre-v0.10.1",
"deprecated": null
Expand Down
26 changes: 26 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.

Loading
Loading