mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-17 07:11:36 +02:00
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:
@@ -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(())
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user