pub(super) mod apply;
pub(super) mod payments;
pub(super) mod planner;
pub(super) mod recovery;
pub(super) mod retention;
pub(super) mod sweep;
pub(crate) use apply::apply_sweep;
use payments::{PendingPayment, SpendStatus};
pub(crate) use planner::{begin_sweep_attempt, history_pending, keys_to_recheck, prepare_sweeps};
pub(crate) use recovery::{maintain, record_paid_check};
pub(crate) use retention::finish_nullifier_recovery;
pub(crate) use sweep::{publication_anchor, queue_directory_lookup};
use std::borrow::BorrowMut;
use rand_core::Rng;
use rusqlite::Connection;
use zcash_protocol::consensus::Parameters;
use crate::{AccountUuid, WalletDb, error::SqliteClientError, util::Clock};
impl<C: BorrowMut<Connection>, P: Parameters, CL: Clock, R: Rng> WalletDb<C, P, CL, R> {
pub fn recheck_one_time_key_history(
&mut self,
account: AccountUuid,
) -> Result<usize, SqliteClientError> {
self.transactionally(|db| recovery::recheck(db.conn.0, db.params, account))
}
pub fn mark_one_time_account_fresh(
&mut self,
account: AccountUuid,
) -> Result<(), SqliteClientError> {
self.transactionally(|db| recovery::mark_fresh(db.conn.0, db.params, account))
}
}
#[cfg(test)]
pub(super) mod tests;