-
Notifications
You must be signed in to change notification settings - Fork 210
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
refactor: Move db.rs into server crates #4567
Conversation
Why do we need ln snapshot regenerated? Seems :sus: |
Because the ln client previously re-used the |
98ed58c
to
955791f
Compare
Do we need a migration? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but do we need a migration?
Nope, its the same prefix and the same struct. |
fedimint_ln_client::db::DbKeyPrefix::LightningGateway => { | ||
let gateways = dbtx | ||
.find_by_prefix(&LightningGatewayKeyPrefix) | ||
.await | ||
.collect::<Vec<_>>() | ||
.await; | ||
let num_gateways = gateways.len(); | ||
ensure!( | ||
num_gateways > 0, | ||
"validate_migrations was not able to read any LightningGateways" | ||
); | ||
info!("Validated LightningGateways"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is why the DB snapshot needed to be regenerated. Before the test was just missing.
There is no reason for db.rs to be in the common crates, since the client and server databases are separate and don't store the same things.
This PR moves db.rs for each of the modules into the server crates from common.