Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 7 additions & 1 deletion lightning-transaction-sync/src/electrum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ impl<L: Logger> ElectrumSyncClient<L> {
let mut tip_header = tip_notification.header;
let mut tip_height = tip_notification.height as u32;

loop {
for i in 0..100 {
if i >= 10 {
log_debug!(self.logger, "Giving up trying to sync transactions after 10 attempts.");
sync_state.pending_sync = true;
return Err(TxSyncError::Failed);
}
Comment thread
TheBlueMatt marked this conversation as resolved.

let pending_registrations = self.queue.lock().unwrap().process_queues(&mut sync_state);
let tip_is_new = Some(tip_header.block_hash()) != sync_state.last_sync_hash;

Expand Down
8 changes: 7 additions & 1 deletion lightning-transaction-sync/src/esplora.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ impl<L: Logger> EsploraSyncClient<L> {

let mut tip_hash = maybe_await!(self.client.get_tip_hash())?;

loop {
for i in 0..100 {
if i >= 10 {
log_debug!(self.logger, "Giving up trying to sync transactions after 10 attempts.");
sync_state.pending_sync = true;
return Err(TxSyncError::Failed);
}
Comment thread
TheBlueMatt marked this conversation as resolved.

let pending_registrations = self.queue.lock().unwrap().process_queues(&mut sync_state);
let tip_is_new = Some(tip_hash) != sync_state.last_sync_hash;

Expand Down
Loading