Merge bitcoindevkit/bdk#2188: fix(electrum): verify txid of server-returned transactions
d101a0973bc19ac1b64809c0d9f0cd3516e263d8 fix(electrum): verify txid of server-returned transactions (Elias Rohrer)
Pull request description:
### Description
An Electrum server could return an arbitrary transaction when `fetch_tx()` requests a specific txid. The returned transaction was cached and used without verifying that its computed txid matches the requested one.
Add a verification check that `tx.compute_txid() == txid` after fetching from the server, returning an error on mismatch. Include a unit test with a mock Electrum client that exercises both the mismatch rejection and the matching-txid happy path.
ACKs for top commit:
evanlinjin:
ACK
d101a0973bc19ac1b64809c0d9f0cd3516e263d8
Tree-SHA512: aecb729fd7d92bf75ec2877b1717eaeed824178d81a5c769a738314326d4a1acddeded3b37837f3af84ca6c69b7c73bff46d901697a8f2125ea1d4c34bef6096