mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 07:41:08 +00:00
Update schnorrkel with versioning (#5358)
* use versioning for deprecated api, remove deprecated api from regular verification * Update primitives/core/src/sr25519.rs * add test to transaction pool Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -466,9 +466,18 @@ pub trait Crypto {
|
||||
.map(|k| k.sign(msg))
|
||||
}
|
||||
|
||||
/// Verify an `sr25519` signature.
|
||||
///
|
||||
/// Returns `true` when the verification in successful regardless of
|
||||
/// signature version.
|
||||
fn sr25519_verify(sig: &sr25519::Signature, msg: &[u8], pubkey: &sr25519::Public) -> bool {
|
||||
sr25519::Pair::verify_deprecated(sig, msg, pubkey)
|
||||
}
|
||||
|
||||
/// Verify an `sr25519` signature.
|
||||
///
|
||||
/// Returns `true` when the verification in successful.
|
||||
#[version(2)]
|
||||
fn sr25519_verify(sig: &sr25519::Signature, msg: &[u8], pubkey: &sr25519::Public) -> bool {
|
||||
sr25519::Pair::verify(sig, msg, pubkey)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user