Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit ce0bf87

Browse files
Review nits
1 parent 570cdc7 commit ce0bf87

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

mutiny-core/src/federation.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,7 +1600,7 @@ async fn subscribe_onchain_confirmation_check<S: MutinyStorage>(
16001600
log_info!(logger, "Transaction confirmed");
16011601
transaction_details.confirmation_time = ConfirmationTime::Confirmed {
16021602
height: s.block_height.expect("confirmed"),
1603-
time: now().as_secs(),
1603+
time: s.block_time.unwrap_or(now().as_secs()),
16041604
};
16051605
match persist_transaction_details(&storage, &transaction_details) {
16061606
Ok(_) => {
@@ -1618,7 +1618,14 @@ async fn subscribe_onchain_confirmation_check<S: MutinyStorage>(
16181618
}
16191619
}
16201620

1621-
sleep(5_000).await;
1621+
// wait for one minute before checking mempool again
1622+
// sleep every second to check if we need to stop
1623+
for _ in 0..60 {
1624+
if stop.load(Ordering::Relaxed) {
1625+
return;
1626+
}
1627+
sleep(1_000).await;
1628+
}
16221629
}
16231630
});
16241631
}

0 commit comments

Comments
 (0)