Skip to content

Commit d4f22df

Browse files
committed
Switch arg order in verify_ecdsa
This function is deprecated and exists to assist the upgrade path, as such the arg order should be the same as in `v0.31.1`.
1 parent bdcb242 commit d4f22df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ecdsa/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,18 +410,18 @@ impl<C: Verification> Secp256k1<C> {
410410
/// #
411411
/// let message = Message::from_digest_slice(&[0xab; 32]).expect("32 bytes");
412412
/// let sig = secp.sign_ecdsa(message, &secret_key);
413-
/// assert_eq!(secp.verify_ecdsa(&sig, message, &public_key), Ok(()));
413+
/// assert_eq!(secp.verify_ecdsa(message, &sig, &public_key), Ok(()));
414414
///
415415
/// let message = Message::from_digest_slice(&[0xcd; 32]).expect("32 bytes");
416-
/// assert_eq!(secp.verify_ecdsa(&sig, message, &public_key), Err(Error::IncorrectSignature));
416+
/// assert_eq!(secp.verify_ecdsa(message, &sig, &public_key), Err(Error::IncorrectSignature));
417417
/// # }
418418
/// ```
419419
#[inline]
420420
#[deprecated(since = "0.32.0", note = "use ecdsa::verify instead")]
421421
pub fn verify_ecdsa(
422422
&self,
423-
sig: &Signature,
424423
msg: impl Into<Message>,
424+
sig: &Signature,
425425
pk: &PublicKey,
426426
) -> Result<(), Error> {
427427
self::verify(sig, msg, pk)

0 commit comments

Comments
 (0)