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

Ensure resulting threshold integer matches script in SignatorySet::from_script #278

Merged
merged 4 commits into from
Feb 12, 2024

Conversation

mappum
Copy link
Contributor

@mappum mappum commented Feb 12, 2024

When deriving a SignatorySet from a redeem script, the resulting threshold value may be calculated differently when derived from truncated voting power vs non-truncated voting power. To ensure the threshold is the same regardless, this PR compares to the expected threshold in the redeem script passed in, and adjusts the present_vp field accordingly.

@codecov-commenter
Copy link

codecov-commenter commented Feb 12, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (a5f8a57) 37.39% compared to head (7300cc1) 37.48%.

Files Patch % Lines
src/bitcoin/signatory.rs 84.61% 4 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #278      +/-   ##
===========================================
+ Coverage    37.39%   37.48%   +0.09%     
===========================================
  Files           26       26              
  Lines         9318     9339      +21     
===========================================
+ Hits          3484     3501      +17     
- Misses        5834     5838       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mappum mappum enabled auto-merge February 12, 2024 20:37
@mappum mappum merged commit 483fd66 into develop Feb 12, 2024
9 checks passed
@mappum mappum deleted the sigset-from-script branch February 12, 2024 21:03
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.

2 participants