Closed rajarshimaitra closed 2 years ago
Currently trying to pass the CI.. Might require few more updates..
I think I have hit a dead lock..
Our Previous CI had reserves
with other blockchains features.. But the way reserve command is written it cannot be used with anything other than electrum
. I am not sure why it wasn't failing before..
So Either we need to enforce that in build.rs
or update the reserve command to work with any backend (not sure if possible, bdk-reserves uses the Electrum Api for the job)..
I have updated the CI file to keep only the reserve, electrum
test..
But I think it won't be reflected in the CI of this PR.. So tests will now always fail here..
One easy way out now is to make another PR with the CI change, get that merged, and rebase this one on top of the new CI..
Any suggestion @notmandatory ?
Update: All other tests are passing except the reverses, esplora/comapct_filters
.
CI fix PR opened here https://github.com/bitcoindevkit/bdk-cli/pull/100
cc @notmandatory
Waiting for some concept ack on this so I can start rebasing #92 on top of this.. That will take some no trivial refactoring..
Rebased on top of #100 to make this dependent on it..
Removed bdk-reserves
patch after v0,19.0 update..
Concept ACK, but looks like some tests still broken. I'm going to be tied up with a PlebFi here in LA this weekend but can spend some time reviewing next week!
No issues.. I will work on fixing the tests, and then move #92 on top of it too..
Pushed some minor doc fixes..
Added a commit to remove external base64 dependency + some clippy nits..
Rebased on master and removed author list changes..
My suggestion for the changelog is something like this, based on your PR comments:
structopt
help documentationbdk
and bdk-reserves
to v0.19.0Thanks @notmandatory for the look.. Sorry it took me some time to get back to this.. ACK on all the comments.. Updated with a new commit for easier review..
I pushed a commit to fix a couple little typos and a problem I found in repl mode with command parsing, probably wasn't a new issue but noticed it when testing, had to enable clap::AppSettings::NoBinaryName.
https://docs.rs/structopt/latest/structopt/trait.StructOpt.html#method.from_iter_safe
Description
This is a massive refactoring PR that changes the whole structure of the crate. Previously it was written like a library to be used to create the bdk-cli app. But eventually the crate itself became the app. This PR attempts to remove the remaining lib like patterns in the code, and make it a pure binary crate.
This makes the code more modular and makes it look like a typical binary rust crate.
There was no real good way to structure the change into separate commits, so I made one single big one.. The best way to review is to look at the final structure of the code itself, not the change set.
The crate has following modules now
main
: The main app runtimecommands
: Includes all the structopt commands used by bdk-cli.handlers
: Include all the command handlers used buy the app.utils
: Include all the utility and helper functionsBackend
: Defines the backend node process, and its related methods. (This will be filled more with #92).Apart from the structure changes there are few other changes that took place
Almost all of the previous doc comments are removed. As they were written to use bdk-cli as a lib. Instead new structopts "comments" are added to describe the app functionality better. As a result the app
--help
commands are more elaborate and descriptive now. I have also removed few redundant description messages used before, that would mess up the help comments. And as a by product it solves https://github.com/bitcoindevkit/bdk-cli/issues/93.bdk is updated to v0.19.0
bdk-reserves is updated with current version pointing to bdk v0.19.0.
Default database is now sqlite.
Overall I think I managed not to break anything.
Currently this change will remove most of the previous documentation on the crate. But those aren't useful to context of bdk-cli after this change.. My proposal would be reproduce the README instructions itself in doc.rs landing page.
We also need to update the README to reflect these changes.. I will open that up in a separate PR.
I also haven't updated changelog yet.. Not sure yet how to describe the change in short.. Will do that once this is almost finalized..
Notes to the reviewers
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features:
CHANGELOG.md