Add updater thread + Updater related functions (#253)

* first attempt at adding updater thread

* rustfmt

* rustfmt

* many lifetimes made static to allow api to spawn separate thread

* add first pass at updater thread functionality

* rustfmt

* add mpsc for returning status from update functions

* rustfmt

* add stop state, ensure update is triggered by wallet functions when wallet updater is running

* rustfmt

* add update status function to owner API, V3 owner api functions

* rustfmt

* change update warning

* adding tests for new updater control functions

* documentation updates

* rustfmt
This commit is contained in:
Yeastplume
2019-11-18 10:49:51 +00:00
committed by GitHub
parent 355f08498c
commit e74c0e2571
17 changed files with 944 additions and 170 deletions
+1 -1
View File
@@ -362,7 +362,7 @@ where
.join(filename);
let path_buf = Path::new(&path).to_path_buf();
let mut stored_tx = File::create(path_buf)?;
let tx_hex = util::to_hex(ser::ser_vec(tx, ser::ProtocolVersion(1)).unwrap());;
let tx_hex = util::to_hex(ser::ser_vec(tx, ser::ProtocolVersion(1)).unwrap());
stored_tx.write_all(&tx_hex.as_bytes())?;
stored_tx.sync_all()?;
Ok(())
+1 -1
View File
@@ -244,7 +244,7 @@ where
K: keychain::Keychain + 'a,
{
let (wallet_refreshed, wallet_info) =
owner::retrieve_summary_info(wallet, keychain_mask, true, 1)?;
owner::retrieve_summary_info(wallet, keychain_mask, &None, true, 1)?;
assert!(wallet_refreshed);
Ok(wallet_info)
}