-
Notifications
You must be signed in to change notification settings - Fork 96
[BUG] Fix rescan during sync #676
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
|
Logs from an old wallet file. A few things:
|
|
For some reason, the API is not updating the progress; it only updates when the scan is finished. |
|
Okay then leave it. Add a todo comment there saying "Currently progress is not showing, figure out how to display progress here". |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #676 +/- ##
==========================================
+ Coverage 68.87% 78.13% +9.25%
==========================================
Files 35 49 +14
Lines 4932 15172 +10240
==========================================
+ Hits 3397 11854 +8457
- Misses 1535 3318 +1783 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
71259d0 to
ca7bd4f
Compare
|
Sync progress is not included in this PR, the progress always returns 0.00%. |
mojoX911
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
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.
Following few things can be ironed out.
in the maker::api2::init()
log::info!("Initializing wallet sync");
wallet.sync_and_save()?;
log::info!("Completed wallet sync");Just keep the site log with the current new format. Remove the completion log. As its already printed in sync_and_save() internals.
in the maker::server::shutdown section
log::info!("Shutdown wallet sync initiated.");
maker.get_wallet().write()?.sync_and_save()?;
log::info!("Shutdown wallet syncing completed.");
log::info!("Wallet file saved to disk.");Just keep the site log and remove other logs.
In the wallet::sync_and_save() function
log::info!(
"Initializing wallet sync and save for {:?}",
&self.store.file_name
);
self.sync_no_fail();
self.save_to_disk()?;
log::info!(
"Completed wallet sync and save for {:?}",
&self.store.file_name
);Shorten the logs as below.
Sync Started for {wallet name}
Synced & Saved {wallet name}
In the maker::server2::shutdown.
We are not syncing at the end. We should.
ed184e4 to
70408d6
Compare
- modified: ignored return value of rescan_blockchain - check rescan status using get_wallet_info and exit accordingly - updates last_synced_height after rescan completes - log wallet's birth height and last_synced_height - ADDS info log at sync site for maker - Changes: `refresh_offer_maxsize_cache` calculation from spendable to max(swap, regular) - Changes: `fn check_swap_liquidity` to use `refresh_offer_maxsize_cache` insted of `sync_and_save` - Udates: `fn check_swap_liquidity_taproot` to use `refresh_offer_maxsize_cache` - Remove `sync_and_save` from update_fidelity_bond_conf_details - Adds sync_and_save to test
mojoX911
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
rescan_blockchainget_wallet_infoand exit accordinglylast_synced_heightafter rescan completes