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

Use effective_value in Rust Bitcoin #27

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

yancyribbens
Copy link
Collaborator

This PR removes the effective_value calculation instead preferring to outsource the calculation to Rust Bitcoin. Also, temporarily remove the error mod for now since Rust Bitcoin returns Option instead of Result. Leaving in Draft state until the outcome of rust-bitcoin/rust-bitcoin#2230 is decided.

@yancyribbens
Copy link
Collaborator Author

@Tibo-lg maybe you care to comment on this or rust-bitcoin/rust-bitcoin#2230

@Tibo-lg
Copy link
Contributor

Tibo-lg commented Dec 5, 2023

It doesn't build for me locally:

error[E0599]: no method named `effective_value` found for struct `TxOut` in the current scope
  --> src/single_random_draw.rs:46:25
   |
46 |             w_utxo.utxo.effective_value(fee_rate, w_utxo.satisfaction_weight)?;
   |                         ^^^^^^^^^^^^^^^ method not found in `TxOut`

@yancyribbens yancyribbens force-pushed the feature/move-eff-value-to-rust-bitcoin branch from ea56a21 to 096176e Compare December 5, 2023 22:06
@yancyribbens
Copy link
Collaborator Author

It doesn't build for me locally:

Oops, I was asked to make this a stand-alone function instead of a method on TxOut. I updated this PR so it should work again now.

src/single_random_draw.rs Outdated Show resolved Hide resolved
@yancyribbens yancyribbens force-pushed the feature/move-eff-value-to-rust-bitcoin branch from f4e058f to 5c6f24c Compare December 6, 2023 13:28
This PR removes the effective_value calculation instead prefering to
outsource the calculation to Rust Bitcoin.  Also, temporarily remove the
error mod for now since Rust Bitcoin returns Option instead of Result.
src/single_random_draw.rs Outdated Show resolved Hide resolved
@yancyribbens yancyribbens force-pushed the feature/move-eff-value-to-rust-bitcoin branch from 5c6f24c to e2446b1 Compare December 7, 2023 11:43
@yancyribbens yancyribbens marked this pull request as ready for review December 20, 2023 13:26
@yancyribbens
Copy link
Collaborator Author

Merging for now since there seems to be no further feedback. Waiting on MR rust-bitcoin/rust-bitcoin#2230 to resolve. Will circle back and remove my fork of rust-bitcoin once resolved.

@yancyribbens yancyribbens merged commit abcf567 into master Dec 20, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants