forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[staging] refactor: use KeyPair in SignSchnorr
Use `KeyPair` instead of creating a `secp256k1_keypair` object. The main change here is creating a `KeyPair` instead of a `secp256k1_keypair` and then passing it to the libsec256k1 functions using `reinterpret_cast<secp256k1_keypair*>(keypair)`. The same variable name `keypair` is used here to simplify the diff in a later commit when all of the logic in SignSchnorr is moved into the KeyPair class, where `keypair` is replaced with the private member `m_keypair`. Note: this is why `data()` is currently non-const. Since SignSchnorr does not have access to the private `m_keypair` member directly, we are cheating and accessing it through `data()` in this commit. This is to keep the changes incremental and easier to review.
- Loading branch information
Showing
2 changed files
with
42 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters