pub fn start_updater(
		&self,
		keychain_mask: Option<&SecretKey>,
		frequency: Duration,
	) -> Result<(), Error> {
		let updater_inner = self.updater.clone();
		let tx_inner = {
			let t = self.status_tx.lock();
			t.clone()
		};
		let keychain_mask = match keychain_mask {
			Some(m) => Some(m.clone()),
			None => None,
		};
		let _ = thread::Builder::new()
			.name("wallet-updater".to_string())
			.spawn(move || {
				let u = updater_inner.lock();
				if let Err(e) = u.run(frequency, keychain_mask, &tx_inner) {
					error!("Wallet state updater failed with error: {}", e);
				}
			})?;
		Ok(())
	}
/// Starts a background wallet update thread, which performs the wallet update process
/// automatically at the frequency specified.
///
/// The updater process is as follows:
///
/// * Reconcile the wallet outputs against the node's current UTXO set, confirming
/// transactions if needs be.
/// * Look up transactions by kernel in cases where it's necessary (for instance, when
/// there are no change outputs for a transaction and transaction status can't be
/// inferred from the output state.
/// * Incrementally perform a scan of the UTXO set, correcting outputs and transactions
/// where their local state differs from what's on-chain. The wallet stores the last
/// position scanned, and will scan back 100 blocks worth of UTXOs on each update, to
/// correct any differences due to forks or otherwise.
///
/// Note that an update process can take a long time, particularly when the entire
/// UTXO set is being scanned for correctness. The wallet status can be determined by
/// calling the [`get_updater_messages`](struct.Owner.html#method.get_updater_messages).
///
/// # Arguments
///
/// * `keychain_mask` - Wallet secret mask to XOR against the stored wallet seed before using, if
/// being used.
/// * `frequency`: The frequency at which to call the update process. Note this is
/// time elapsed since the last successful update process. If calling via the JSON-RPC
/// api, this represents milliseconds.
///
/// # Returns
/// * Ok if successful
/// * or [`libwallet::Error`](../mimble_wallet_libwallet/struct.Error.html) if an error is encountered.
///
/// # Example
/// Set up as in [`new`](struct.Owner.html#method.new) method above.
/// ```
/// # mimble_wallet_api::doctest_helper_setup_doc_env!(wallet, wallet_config);
///
/// use mimble_core::global::ChainTypes;
///
/// use std::time::Duration;
///
/// // Set up as above
/// # let api_owner = Owner::new(wallet.clone(), None, None);
///
/// let res = api_owner.start_updater(None, Duration::from_secs(60));
///
/// if let Ok(_) = res {
///   // ...
/// }
/// ```
Starts a background wallet update thread, which performs the wallet update process
automatically at the frequency specified.

The updater process is as follows.

Reconcile the wallet outputs against the node's current UTXO set, confirming
transactions if needs be.
Look up transactions by kernel in cases where it's necessary (for instance, when
there are no change outputs for a transaction and transaction status can't be
inferred from the output state.
Incrementally perform a scan of the UTXO set, correcting outputs and transactions
where their local state differs from what's on-chain. The wallet stores the last
position scanned, and will scan back 100 blocks worth of UTXOs on each update, to
correct any differences due to forks or otherwise.

Note that an update process can take a long time, particularly when the entire
UTXO set is being scanned for correctness. The wallet status can be determined by
calling the [`get_updater_messages`](struct.Owner.html#method.get_updater_messages).
Starts a background wallet update thread which performs the wallet update process automatically at the frequency specified . The updater process is as follows . Reconcile the wallet outputs against the node ' s current UTXO set confirming transactions if needs be . Look up transactions by kernel in cases where it ' s necessary ( for instance when there are no change outputs for a transaction and transaction status can ' t be inferred from the output state . Incrementally perform a scan of the UTXO set correcting outputs and transactions where their local state differs from what ' s on - chain . The wallet stores the last position scanned and will scan back 100 blocks worth of UTXOs on each update to correct any differences due to forks or otherwise . Note that an update process can take a long time particularly when the entire UTXO set is being scanned for correctness . The wallet status can be determined by calling the [ ` get_updater_messages ` ] ( struct . Owner . html#method . get_updater_messages ) .
pub fn start_updater(
		&self,
		keychain_mask: Option<&SecretKey>,
		frequency: Duration,
	) -> Result<(), Error> {
		let updater_inner = self.updater.clone();
		let tx_inner = {
			let t = self.status_tx.lock();
			t.clone()
		};
		let keychain_mask = match keychain_mask {
			Some(m) => Some(m.clone()),
			None => None,
		};
		let _ = thread::Builder::new()
			.name("wallet-updater".to_string())
			.spawn(move || {
				let u = updater_inner.lock();
				if let Err(e) = u.run(frequency, keychain_mask, &tx_inner) {
					error!("Wallet state updater failed with error: {}", e);
				}
			})?;
		Ok(())
	}
pub fn start_updater ( & self , keychain_mask : Option < & SecretKey > , frequency : Duration , ) -> Result < ( ) , Error > { let updater_inner = self . updater . clone ( ) ; let tx_inner = { let t = self . status_tx . lock ( ) ; t . clone ( ) } ; let keychain_mask = match keychain_mask { Some ( m ) => Some ( m . clone ( ) ) , None => None , } ; let _ = thread :: Builder :: new ( ) . name ( " " . to_string ( ) ) . spawn ( move | | { let u = updater_inner . lock ( ) ; if let Err ( e ) = u . run ( frequency , keychain_mask , & tx_inner ) { error ! ( " " e ) ; } } ) ? ; Ok ( ( ) ) }
Starts a background wallet update thread, which performs the wallet update process
automatically at the frequency specified.
Starts a background wallet update thread which performs the wallet update process automatically at the frequency specified .
&self
keychain_mask
Option<&SecretKey>
frequency
Duration
Ok if successful
or [`libwallet::Error`](../mimble_wallet_libwallet/struct.Error.html) if an error is encountered.
Ok if successful or [ ` libwallet :: Error ` ] ( .. / mimble_wallet_libwallet / struct . Error . html ) if an error is encountered .
&self
keychain_mask
Option<&SecretKey>
frequency
Duration
example
Set up as in [`new`](struct.Owner.html#method.new) method above.
Set up as in [ ` new ` ] ( struct . Owner . html#method . new ) method above .
mimble_wallet_api::doctest_helper_setup_doc_env!(wallet, wallet_config);
use mimble_core::global::ChainTypes.

use std::time::Duration.

Set up as above
use mimble_core :: global :: ChainTypes . use std :: time :: Duration . Set up as above
let api_owner = owner::new(wallet.clone(), none, none);
let res = api_owner.start_updater(None, Duration::from_secs(60)).


let res = api_owner . start_updater ( None Duration :: from_secs ( 60 )) .