-
Notifications
You must be signed in to change notification settings - Fork 88
Add key-value-db and sqlite-db features, separate wallet directories #71
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
Conversation
dfa8c2a to
2e38011
Compare
|
@rajarshimaitra can you take a look at this one? EDIT: |
rajarshimaitra
left a comment
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.
Review ACK 2e38011
Looks good for now.. Will review again when additive features stuff is done..
|
@rajarshimaitra I changed my mind again on the additive features thing. I still think it'd be good to try but will be a biggish change (if it's even possible) for bdk-cli and probably not worth the effort right now. This PR is now rebased and should be ready to go. |
rajarshimaitra
left a comment
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.
Ack 00454be
With just one question..
| #[cfg(not(feature = "sqlite-db"))] | ||
| if !db_dir.exists() { | ||
| info!("Creating database directory {}", db_dir.as_path().display()); | ||
| fs::create_dir(&db_dir).map_err(|e| Error::Generic(e.to_string()))?; | ||
| } |
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 did not understand the reason of feature guard here. For both sled and sqlite we would want to check if the dir exists right??
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.
The reason is that sqlite creates only a single file and doesn't need a directory to exist to put it's files in.
Description
Add distinct
key-value-dbandsqlite-dbfeatures, keep default askey-value-dbPut cached wallet data in separate directories:
~/.bdk-bitcoin/<wallet_name>Put compact filter data in
<wallet_name>/compact_filtersDepending on the db used put cached wallet data in:
<wallet_name>/wallet.sled/or<wallet_name>/wallet.sqliteNotes to the reviewers
This change will help test BDK with different databases, in particular for manually testing DB migrations such as in bitcoindevkit/bdk#502.
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingNew Features:
CHANGELOG.md