Skip to content

Conversation

@rustyrussell
Copy link
Contributor

Long requested, adds wait/pagination support to listhtlcs.

@rustyrussell rustyrussell added this to the v25.05 milestone Mar 18, 2025
@rustyrussell rustyrussell requested a review from cdecker as a code owner March 18, 2025 04:30
@rustyrussell rustyrussell force-pushed the guilt/listhtlcs-pagination branch 5 times, most recently from 22ccf70 to 670a36a Compare March 20, 2025 01:27
@rustyrussell rustyrussell force-pushed the guilt/listhtlcs-pagination branch from 670a36a to c49ccbb Compare April 4, 2025 04:07
@rustyrussell rustyrussell force-pushed the guilt/listhtlcs-pagination branch 2 times, most recently from cc2e043 to d59e2bc Compare April 16, 2025 04:13
@rustyrussell rustyrussell force-pushed the guilt/listhtlcs-pagination branch 6 times, most recently from 42f6fca to c1baf6d Compare April 25, 2025 02:52
@cdecker
Copy link
Member

cdecker commented Apr 25, 2025

ACK c1baf6d

@rustyrussell rustyrussell force-pushed the guilt/listhtlcs-pagination branch 2 times, most recently from 296c20d to 5a40d83 Compare April 28, 2025 04:42
Otherwise it can get included in contrib/msggen/msggen/schema.json!

Signed-off-by: Rusty Russell <[email protected]>
The last argument is a pointer, but we were handing `false`.  Which, for
terrible historic reasons, gets treated as NULL.

Signed-off-by: Rusty Russell <[email protected]>
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]>
We're not going to increment one at a time for bulk deletion of htlcs
when a channel closes.  There could be millions of HTLCs!

Signed-off-by: Rusty Russell <[email protected]>
This prepares us for doing listhtlcs pagination.

Signed-off-by: Rusty Russell <[email protected]>
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.
Signed-off-by: Rusty Russell <[email protected]>
Changelog-Added: JSON-RPC: `listhtlcs` has `created_index` and `updated_index` fields.
Changelog-Added: JSON-RPC: `listhtlcs` supports `index`, `start` and `end` parameters for pagination support.
Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell force-pushed the guilt/listhtlcs-pagination branch from 5a40d83 to 35d9c81 Compare April 28, 2025 04:48
@rustyrussell rustyrussell merged commit 6bf3691 into ElementsProject:master Apr 29, 2025
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants