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
14 changes: 13 additions & 1 deletion lightning-transaction-sync/src/electrum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,17 +336,29 @@ where
script_history.iter().filter(|h| h.tx_hash == **txid);
if let Some(history) = filtered_history.next() {
let prob_conf_height = history.height as u32;
if prob_conf_height <= 0 {
// Skip if it's a an unconfirmed entry.
continue;
}
let confirmed_tx = self.get_confirmed_tx(tx, prob_conf_height)?;
confirmed_txs.push(confirmed_tx);
}
debug_assert!(filtered_history.next().is_none());
if filtered_history.next().is_some() {
log_error!(
self.logger,
"Failed due to server returning multiple history entries for Tx {}.",
txid
);
return Err(InternalError::Failed);
}
}

for (watched_output, script_history) in
sync_state.watched_outputs.values().zip(output_results)
{
for possible_output_spend in script_history {
if possible_output_spend.height <= 0 {
// Skip if it's a an unconfirmed entry.
continue;
}

Expand Down