Wallet - only update outputs with unconfirmed transactions outstanding (#2322)

* Only update outputs with unconfirmed transactions outstanding

* add further check for Unspent output that have been spent to check_repair

* rename  to

* make updating all outputs optional API parameter. do full update before a wallet check, remove unspent->spent check from check process

* rustfmt

* typo
This commit is contained in:
Yeastplume
2019-01-10 11:17:35 +00:00
committed by GitHub
parent 5915580ab3
commit 4191b15410
9 changed files with 50 additions and 19 deletions
+4 -2
View File
@@ -501,14 +501,16 @@ pub fn check_repair(
wallet: Arc<Mutex<WalletInst<impl NodeClient + 'static, keychain::ExtKeychain>>>,
) -> Result<(), Error> {
controller::owner_single_use(wallet.clone(), |api| {
warn!("Starting wallet check...",);
warn!("Updating all wallet outputs, please wait ...",);
let result = api.check_repair();
match result {
Ok(_) => {
warn!("Wallet check/repair complete",);
warn!("Wallet check complete",);
Ok(())
}
Err(e) => {
error!("Wallet check/repair failed: {}", e);
error!("Wallet check failed: {}", e);
error!("Backtrace: {}", e.backtrace().unwrap());
Err(e)
}