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
+1 -1
View File
@@ -587,7 +587,7 @@ pub fn wallet_command(
command::cancel(inst_wallet(), a)
}
("restore", Some(_)) => command::restore(inst_wallet()),
("check_repair", Some(_)) => command::check_repair(inst_wallet()),
("check", Some(_)) => command::check_repair(inst_wallet()),
_ => {
let msg = format!("Unknown wallet command, use 'grin help wallet' for details");
return Err(ErrorKind::ArgumentError(msg).into());
+1 -1
View File
@@ -462,7 +462,7 @@ mod wallet_tests {
];
execute_command(&app, test_dir, "wallet1", &client1, arg_vec)?;
let arg_vec = vec!["grin", "wallet", "-p", "password", "check_repair"];
let arg_vec = vec!["grin", "wallet", "-p", "password", "check"];
execute_command(&app, test_dir, "wallet1", &client1, arg_vec)?;
// txs and outputs (mostly spit out for a visual in test logs)
+1 -1
View File
@@ -294,6 +294,6 @@ subcommands:
takes_value: false
- restore:
about: Restores a wallet contents from a seed file
- check_repair:
- check:
about: Checks a wallet's outputs against a live node, repairing and restoring missing outputs if required