Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(electrum): Avoid fetching prev txout of coinbase txs #1755

Conversation

evanlinjin
Copy link
Member

Description

Coinbase txs do not have previous txs. The previous txout fields are always of empty txids. Requesting such a transaction from electrum will return an error and fail our full-scan/sync request. This will be unfortunate if a miner decides to use a wallet which uses BDK + Electrum.

Changelog notice

  • Fix fetch prev txout logic in bdk_electrum to not fetch prev outputs of coinbase txs.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

Coinbase txs do not have previous txs. The previous txout fields are
always of empty txids. Requesting such a transaction from electrum will
return an error and fail our full-scan/sync request. This will be
unfortunate if a miner decides to use a wallet which uses BDK +
Electrum.
@evanlinjin evanlinjin added bug Something isn't working audit Suggested as result of external code audit labels Dec 3, 2024
@evanlinjin evanlinjin added this to the 1.0.0-beta milestone Dec 3, 2024
@evanlinjin evanlinjin self-assigned this Dec 3, 2024
@evanlinjin
Copy link
Member Author

This work was already done by @LagginTimes in #1675. Unfortunately, he decided to include 3 fixes in one PR so that one can't be merged anytime soon.

I will close this PR but I expect @LagginTimes to cherry-pick this specific fix out and create a new PR.

@evanlinjin evanlinjin closed this Dec 3, 2024
@notmandatory notmandatory removed this from the 1.0.0-beta milestone Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit Suggested as result of external code audit bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants