From: 志宇 Date: Fri, 6 Dec 2024 07:24:20 +0000 (+1100) Subject: Merge bitcoindevkit/bdk#1756: fix(electrum): prevent `fetch_prev_txout` from querying... X-Git-Tag: v1.0.0-beta.6~4 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/struct.EncoderStringWriter.html?a=commitdiff_plain;h=bcff89d51d0e1d91058e4430eda8cc57fb7f0f08;p=bdk Merge bitcoindevkit/bdk#1756: fix(electrum): prevent `fetch_prev_txout` from querying coinbase transactions d4ef26611b83baefac65fffc0758c6ac55ade9cb test(electrum): `fetch_prev_txout` does not process coinbase transactions (Wei Chen) 0944b352156fcd797a5c199a462ccaed3761db0a fix(electrum): prevent `fetch_prev_txout` from querying coinbase transactions (Wei Chen) Pull request description: Fixes #1698. ### Description `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`/`full_scan` to fail. Without this critical bug fix, `bdk_electrum` will crash when someone tracks an address being mined to. ### Notes to the reviewers ### Changelog notice * `fetch_prev_txout` no longer queries coinbase transactions. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### Bugfixes: * [ ] This pull request breaks the existing API * [x] I've added tests to reproduce the issue which are now passing * [x] I'm linking the issue being fixed by this PR ACKs for top commit: evanlinjin: ACK d4ef26611b83baefac65fffc0758c6ac55ade9cb Tree-SHA512: 6423f9486e84f204cf756117cabff35ce79ee169efa43a059c1669ad0f7193b58299eee7c5672af35ab070ed8011637b0a1904866ce2f2fa4580ddc3f9f2d982 --- bcff89d51d0e1d91058e4430eda8cc57fb7f0f08