-
Notifications
You must be signed in to change notification settings - Fork 12
RPC wallet syncing example with Functional tests #170
base: master
Are you sure you want to change the base?
Conversation
5d0c995
to
cb9957b
Compare
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #170 +/- ##
=======================================
Coverage 56.74% 56.74%
=======================================
Files 10 10
Lines 252 252
=======================================
Hits 143 143
Misses 109 109 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
The latest update does the following:
|
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.
Thanks @rajarshimaitra. I think the design works. I suggest trimming down the scope of rpc.rs
to only wallet_scan
. Everything else seems like pure example code that can go in main.rs
. The user can be left to make sure that all the spks they are interested in are loaded into the wallet. This allows them to use descriptors also. If we want to get more opinionated about this we can do it later.
The tests are not testing wallet_scan
. I think they should only be testing the sparse chain output from wallet_scan
.
I think we should make use of the label feature in bitcoin core rpc so wallet_scan
takes a label
to scan over (perhaps optional). In the example we should somehow expose the label.
Maybe call wallet_scan
fetch_sparse_chain
.
cb9957b
to
1708de4
Compare
1708de4
to
7027eb1
Compare
Thanks @LLFourn for the review.. Updated as suggested.
|
Thanks @rajarshimaitra.
We could fix this by getting rid of the
This is good because this library doesn't provide create tx functionality. |
This PR adds the complete RPC syncing example with functional tests added in
bdk_rpc_wallet_example/tests
.The RPC sync is by the "import into a core wallet" approach.
The functional tests covers 3 basic tests
This can be used as a reference to use the
bitcoind
backend to run similar electrum and esplora functional tests.More tests would be added in this PR or later.