Skip to content

Commit 2fceda8

Browse files
committed
review: Make method names consistent
- Improve docs for `test_utils::insert_tx`
1 parent d6c075d commit 2fceda8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

wallet/src/test_utils.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,9 @@ pub fn insert_checkpoint(wallet: &mut Wallet, block: BlockId) {
312312
.unwrap();
313313
}
314314

315-
/// Insert a transaction at the current system time.
315+
/// Inserts a transaction into the local view, assuming it is currently present in the mempool.
316+
///
317+
/// This can be used, for example, to track a transaction immediately after it is broadcast.
316318
pub fn insert_tx(wallet: &mut Wallet, tx: Transaction) {
317319
let txid = tx.compute_txid();
318320
let seen_at = std::time::UNIX_EPOCH.elapsed().unwrap().as_secs();

wallet/src/wallet/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2373,7 +2373,10 @@ impl Wallet {
23732373
///
23742374
/// The `start_time` is used to record the time that a mempool transaction was last seen
23752375
/// (or evicted). See [`Wallet::start_sync_with_revealed_spks`] for more.
2376-
pub fn start_sync_at(&self, start_time: u64) -> SyncRequestBuilder<(KeychainKind, u32)> {
2376+
pub fn start_sync_with_revealed_spks_at(
2377+
&self,
2378+
start_time: u64,
2379+
) -> SyncRequestBuilder<(KeychainKind, u32)> {
23772380
use bdk_chain::keychain_txout::SyncRequestBuilderExt;
23782381
SyncRequest::builder_at(start_time)
23792382
.chain_tip(self.chain.tip())

0 commit comments

Comments
 (0)