Skip to content

Commit

Permalink
electrum: fix update of spend_txid for spending coins
Browse files Browse the repository at this point in the history
  • Loading branch information
jp1ac4 committed Sep 12, 2024
1 parent 718234c commit 7180245
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/bitcoin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,18 @@ impl BitcoinInterface for electrum::Electrum {
expired_spending.push(*op);
}
if let Some(block) = w_c.spend_block {
spent.push((*op, *spend_txid, block.height, block.time));
if let Some(w_spend_txid) = w_c.spend_txid {
spent.push((*op, w_spend_txid, block.height, block.time));
} else {
log::error!(
"Coin at {} has spend_block {:?} \
without any spend_txid. It previously \
had spend_txid {}",
op,
block,
spend_txid,
);
}
}
}
}
Expand Down

0 comments on commit 7180245

Please sign in to comment.