-
Notifications
You must be signed in to change notification settings - Fork 394
fix(wallet): added the validation of previous tx outputs for get_psbt_input #1911
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
Conversation
Note that adding the enum variant would constitute a major semver change, but there should be a way to reuse an error from rust-miniscript, for example |
hey @ValuedMammal As per your suggestion i have updated the error variant . I have found IndexOutOfBounds error variant in UtxoUpdateError i have used that. |
Hey @ValuedMammal updated as you have suggested. |
Hey @ItshMoh, this PR needs to be closed and moved to the new bdk_wallet repo. Here's how:
|
Replaced by bitcoindevkit/bdk_wallet#232 |
6ffc874 fix!: Check prevout bounds in `Wallet::build_fee_bump` (志宇) 00a57cf fix: Validate prevouts in `get_psbt_input` (ItshMoh) Pull request description: Fixes #50 Fixes #51 Replaces bitcoindevkit/bdk#1911 Replaces bitcoindevkit/bdk#1913 ### Description We should check the bounds of the prev txs. ### Changelog notice ```md Fixed: - Wallet::get_psbt_input method now checks bounds when fetching prevout - Wallet::build_fee_bump method now checks bounds when fetching prevout ``` ### 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: ~~* [ ] 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: ValuedMammal: ACK 6ffc874 Tree-SHA512: f2df49b5bc827583251b1dc8b965a038a239a7fa321cc30504d2f1862523be4e132066643c1e1309122d19eefd65ddbac4c714724899b662c6a879df71bd3752
Description
It is fixing the issue bitcoindevkit/bdk_wallet#50 . This PR is adding validation of previous tx outputs. we would be checking the size of the prev_tx.output vector.
Notes to the reviewers
Here i have checked the size of the prev_tx.output vector. I have also added an error type of "InvalidVoutIndex"
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingBugfixes: