Skip to content

Commit 6ac9f4d

Browse files
authored
Merge pull request #316 from sanket1729/err_fix
Change error enum for KeyPair::from_seckey_slice
2 parents 05f4278 + 5bac4e4 commit 6ac9f4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/schnorrsig.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ impl KeyPair {
167167
data: &[u8],
168168
) -> Result<KeyPair, Error> {
169169
if data.is_empty() || data.len() != constants::SECRET_KEY_SIZE {
170-
return Err(InvalidPublicKey);
170+
return Err(InvalidSecretKey);
171171
}
172172

173173
unsafe {
@@ -313,7 +313,7 @@ impl PublicKey {
313313

314314
/// Tweak an x-only PublicKey by adding the generator multiplied with the given tweak to it.
315315
///
316-
/// Returns a boolean representing the parity of the tweaked key, which can be provided to
316+
/// Returns a boolean representing the parity of the tweaked key, which can be provided to
317317
/// `tweak_add_check` which can be used to verify a tweak more efficiently than regenerating
318318
/// it and checking equality. Will return an error if the resulting key would be invalid or
319319
/// if the tweak was not a 32-byte length slice.

0 commit comments

Comments
 (0)