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

Move database impls into their own crates #611

Merged
merged 2 commits into from
Sep 23, 2022

Conversation

elsirion
Copy link
Contributor

@elsirion elsirion commented Sep 22, 2022

This way we don't have to use feature flags on fedimint-api anymore and make sure third party DB implementations would actually work.

@codecov-commenter
Copy link

Codecov Report

Base: 72.43% // Head: 72.38% // Decreases project coverage by -0.05% ⚠️

Coverage data is based on head (047a3b0) compared to base (3df620f).
Patch coverage: 43.75% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #611      +/-   ##
==========================================
- Coverage   72.43%   72.38%   -0.06%     
==========================================
  Files          85       85              
  Lines       11550    11590      +40     
==========================================
+ Hits         8366     8389      +23     
- Misses       3184     3201      +17     
Impacted Files Coverage Δ
client/cli/src/main.rs 0.30% <0.00%> (ø)
client/clientd/src/main.rs 0.82% <0.00%> (-0.01%) ⬇️
fedimint-api/src/db/mod.rs 79.02% <ø> (ø)
fedimint/src/lib.rs 82.71% <0.00%> (+0.33%) ⬆️
ln-gateway/src/bin/ln_gateway.rs 0.55% <0.00%> (-0.01%) ⬇️
fedimint-sled/src/lib.rs 49.31% <52.00%> (ø)
fedimint-rocksdb/src/lib.rs 52.77% <57.69%> (ø)
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Ok(RocksDb(db))
}

pub fn into_any(self) -> Box<dyn Database> {
Copy link
Contributor

@dpc dpc Sep 22, 2022

Choose a reason for hiding this comment

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

This (_any) is a bit of a misnomer, as Any and dyn Trait are a different trait. into_dyn or into_boxed maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's also a lot of to_any in the network stack. I should rename that too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in #626

@elsirion elsirion force-pushed the 2022-09-extract-db-impls branch from 047a3b0 to 6f54df1 Compare September 23, 2022 08:11
elsirion added a commit to elsirion/fedimint that referenced this pull request Sep 23, 2022
@dpc noted that `(in)to_any` is inaccurate in fedimint#611.
fedimint#611 (comment)
@elsirion elsirion force-pushed the 2022-09-extract-db-impls branch 2 times, most recently from c39050b to 8810ff9 Compare September 23, 2022 10:37
@elsirion elsirion force-pushed the 2022-09-extract-db-impls branch from 8810ff9 to 59c72e3 Compare September 23, 2022 10:51
@elsirion elsirion requested review from dpc and justinmoon September 23, 2022 19:23
@dpc dpc merged commit 768022a into fedimint:master Sep 23, 2022
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