[bug-fix] Set the sync time in populate test db.#717
[bug-fix] Set the sync time in populate test db.#717rajarshimaitra wants to merge 1 commit intobitcoindevkit:masterfrom
Conversation
This allows to retrieve the right wallet balance. Or else it will just assume the wallet db is never synced. Add a test to confirm behavior.
|
This is becoming a more intrusive change than I previously thought.. There are test cases thats working on the assumption that sync height is never set, even when I am trying next to replay the fix on top of #624.. I think that will reduce the review effort, as all these functions are refactored there anyway.. And its not a major bug, so can wait for sometime, if the fix isn't just few lines anymore.. More suggestions welcome in the mean time.. Idea: The other way of fixing this bug is, do not check for sync time at |
|
Closing this in favor of #624 where the full fix is included.. |
Description
After recent changes in balance calculation, the
get_funded_wallettest function will not show any balance because we are not setting thesync_timein thepopulate_test_dbmacro..Our existing tests are not failing, because even if the balance is shown zero, it will still be able to produce transactions. But its causing test failure in downstream
bdk-reservescrate where the balances are required to assert scenarios.Notes to the reviewers
This will be replayed in #624 too, as this function is being refactored there.. For now opening it as separate PR for quick merge.
Checklists
All Submissions:
cargo fmtandcargo clippybefore committingBugfixes: