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

More db cleanups (prep for wait command) #6379

Merged
merged 11 commits into from
Jul 18, 2023

Conversation

rustyrussell
Copy link
Contributor

Let's clean up bindings for future diff simplicity, and remove our weird abstraction layer for invoices.

We need this to access ->ld later.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We use it everywhere, the wallet_ prefix is weird.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We can expose the dbid, rather than pretending we have some "struct
invoice" which is actually just the dbid.  And don't have a pile of
"wallet_" wrappers for redirection.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell
Copy link
Contributor Author

Rebase for CI fixes

@cdecker cdecker self-assigned this Jul 13, 2023
Copy link
Collaborator

@endothermicdev endothermicdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! I like this change to the binding system - it sacrifices only a slight amount of flexibility, but makes the code more readable (enforces ordering and no counting required) and should greatly reduce the diffs in many cases. Just need to keep the invoices in a sensible order (or document the changed behavior.)
Concept ACK

wallet/invoices.c Outdated Show resolved Hide resolved
lightningd/invoice.c Show resolved Hide resolved
Same as we use for offers, etc.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This is almost always true already; fix up the few non-standard ones.

This is enforced with an assert, and I ran the entire test suite to
double-check.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Simply always bind the next one.  No arithmetic required now!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell rustyrussell merged commit 0bcff1e into ElementsProject:master Jul 18, 2023
38 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.

3 participants