-
Notifications
You must be signed in to change notification settings - Fork 945
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
rustyrussell
wants to merge
16
commits into
ElementsProject:master
Choose a base branch
from
rustyrussell:guilt/bookkeeper-migrate
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Bookkeeper refactors and cleanups in preparation for migration #8410
rustyrussell
wants to merge
16
commits into
ElementsProject:master
from
rustyrussell:guilt/bookkeeper-migrate
+990
−879
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]>
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]>
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`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Funny things happened along the way, but this doesn't actually change any APIs yet.