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: missing sighashtype when finalizing taproot keyspend signature #2006

Merged
merged 1 commit into from
Jul 23, 2023

Conversation

Eoous
Copy link
Contributor

@Eoous Eoous commented Jul 14, 2023

Add sighash flag at end of taproot keyspend signature(witness).

Related: #2004

Fixes #2005

@Eoous Eoous changed the title fix: missing sighashtype in transaction data fix: missing sighashtype when finalizing taproot keyspend signature Jul 14, 2023
btcutil/psbt/finalizer.go Outdated Show resolved Hide resolved
@Eoous
Copy link
Contributor Author

Eoous commented Jul 16, 2023

Thanks for the review @Roasbeef. Addressed your comments.

@Eoous Eoous requested a review from Roasbeef July 16, 2023 16:47
Copy link
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!
Left a few comments. Also, can you please squash the commits into one or two.

btcutil/psbt/finalizer.go Outdated Show resolved Hide resolved
btcutil/psbt/psbt_test.go Outdated Show resolved Hide resolved
btcutil/psbt/psbt_test.go Outdated Show resolved Hide resolved
psbt: fix missing sighash flag when finalizing
psbt: test finalizer add proper sighash flag
@Eoous
Copy link
Contributor Author

Eoous commented Jul 17, 2023

Thanks for the review @guggero. Addressed your comments.

@Eoous Eoous requested a review from guggero July 17, 2023 10:38
@coveralls
Copy link

Pull Request Test Coverage Report for Build 5574614891

  • 13 of 13 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.07%) to 55.303%

Totals Coverage Status
Change from base Build 5525483102: 0.07%
Covered Lines: 26729
Relevant Lines: 48332

💛 - Coveralls

Copy link
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@Eoous
Copy link
Contributor Author

Eoous commented Jul 18, 2023

PTAL @Roasbeef :)

Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🌸

@Roasbeef Roasbeef merged commit 3a9e7e2 into btcsuite:master Jul 23, 2023
3 checks passed
@Eoous Eoous deleted the sig_hash_type branch July 28, 2023 15:08
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.

btcutil/psbt: finalizer ignores sighash flag when finalizing taproot keyspend signature
4 participants