Skip to content

Commit

Permalink
fix(electrum): prevent fetch_prev_txout from querying coinbase tran…
Browse files Browse the repository at this point in the history
…sactions

\`fetch_prev_txout\` should not try to query the prevouts of coinbase
transactions, as it may result in the Electrum server returning an error
which would cause the overall `sync` to fail.
  • Loading branch information
LagginTimes committed Dec 3, 2024
1 parent f6c1c61 commit 541abe9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/electrum/src/bdk_electrum_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ impl<E: ElectrumApi> BdkElectrumClient<E> {
) -> Result<(), Error> {
let mut no_dup = HashSet::<Txid>::new();
for tx in &tx_update.txs {
if no_dup.insert(tx.compute_txid()) {
if !tx.is_coinbase() && no_dup.insert(tx.compute_txid()) {
for vin in &tx.input {
let outpoint = vin.previous_output;
let vout = outpoint.vout;
Expand Down

0 comments on commit 541abe9

Please sign in to comment.