Skip to content

Bookkeeper refactors and cleanups in preparation for migration #8410

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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

rustyrussell
Copy link
Contributor

Funny things happened along the way, but this doesn't actually change any APIs yet.

Print the error!

Signed-off-by: Rusty Russell <[email protected]>
This is how we handle amount_msat and amount_sat everywhere these days, and this
wasn't updated.

Signed-off-by: Rusty Russell <[email protected]>
…cations.

Rather than converting to a generic coin_mvt struct, use these directly in
the notification, which is more explicit.

Signed-off-by: Rusty Russell <[email protected]>
Now we only ever use `struct chain_coin_mvt` or `struct channel_coin_mvt`.

Signed-off-by: Rusty Russell <[email protected]>
The part id is *only* unique within a group.  The payment_hash / partid / groupid tuple
is unique.

Signed-off-by: Rusty Russell <[email protected]>
Changelog-Added: Plugins: `coin_movement` notification with `part_id` field now always has `group_id` field.
More readable for me.  Also, change order so we definitely break
compilation on all callers (putting enum before amount).

Signed-off-by: Rusty Russell <[email protected]>
…others.

This means we can keep a pointer to the channel directly, *or* a string.
This avoids gratuitous formatting (on creation) and lookups (later).

Signed-off-by: Rusty Russell <[email protected]>
Prefix MVT_ to them, for clarity.

Signed-off-by: Rusty Russell <[email protected]>
This isn't a robust assumption, so sort them before comparison.

Signed-off-by: Rusty Russell <[email protected]>
Undocumented, but the first tag in the coin_movement notification is
considered the primary tag, and the others are optional.  The
bookkeeper plugin relies on this!

Enforce that this is true, and in the process document in the code which
is the primary tag.

Signed-off-by: Rusty Russell <[email protected]>
Rather than open-coding in json_parse.

Signed-off-by: Rusty Russell <[email protected]>
We're going to store them in the db this way, so I thought I'd see what it looks like if
we lift that interface all the way through.

We use a struct, so that types are checked strictly.

Signed-off-by: Rusty Russell <[email protected]>
…d `extra_tags`.

Signed-off-by: Rusty Russell <[email protected]>
Changelog-Deprecated: JSON-RPC: `coin_movement` notification `tags` array (use `primary_tag` and `extra_tags`).
Changelog-Added: JSON-RPC: `coin_movement` notification `primary_tag` and `extra_tags`.
@rustyrussell rustyrussell added this to the v25.09 milestone Jul 11, 2025
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.

1 participant