Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions bdk-ffi/src/electrum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,15 @@ impl ElectrumClient {
Ok(Arc::new(Transaction::from(tx.as_ref().clone())))
}

/// Insert transactions into the transaction cache so that the client will not re-fetch them.
///
/// Typically used with a new client before a `full_scan` or `sync`, passing the transactions
/// the wallet already has (see `Wallet.transactions`), so that the scan only downloads new ones.
pub fn populate_tx_cache(&self, txs: Vec<Arc<Transaction>>) {
self.0
.populate_tx_cache(txs.iter().map(|tx| BdkTransaction::from(tx.as_ref())));
}

/// Returns the capabilities of the server.
pub fn server_features(&self) -> Result<ServerFeaturesRes, ElectrumError> {
let res = self
Expand Down
Loading