bitcoindevkit / bdk-cli

A CLI wallet library and REPL tool to demo and test the BDK library
Other
111 stars 65 forks source link

Add optional features for wallet data #63

Closed notmandatory closed 2 years ago

notmandatory commented 2 years ago

Currently bdk-cli can only use the bdk/key-value-db feature for wallet data storage. I propose we make the bdk/default memory database the default for bdk-cli, and add two new optional and mutually exclusive features that enable use of the bdk/key-value-db or sqlite DBs which override using the memory DB. These features could be named key-value-db and sqlite.

The purpose of this requested change is to make it possible to test bdk using the bdk-cli tool with any of the three possible wallet data storage options.

notmandatory commented 2 years ago

EDIT: If possible I'd like to make the database features NOT mutually exclusive.

rajarshimaitra commented 2 years ago

I haven't fully grasped on the down side of not having mutually exclusive features.. Is that a very big problem? Many things especially like DB might make more sense to be mutually exclusive I feel?

notmandatory commented 2 years ago

Not having mutually exclusive features is recommended in the Cargo book but is probably more of an issue for libs than end bins like this project. But even here I think it would be useful to be able to enable all features and use them all without having to rebuild to enable/disable the ones I want to test with.