mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 19:51:05 +00:00
sp-beefy: align authority id key type with its signature type (#13131)
Still allows custom message hasher, but ties together the crypto types used for private+public keys and the signature. Signed-off-by: acatangiu <adrian@parity.io>
This commit is contained in:
@@ -25,7 +25,7 @@ use log::warn;
|
||||
|
||||
use beefy_primitives::{
|
||||
crypto::{Public, Signature},
|
||||
BeefyVerify, KEY_TYPE,
|
||||
BeefyAuthorityId, KEY_TYPE,
|
||||
};
|
||||
|
||||
use crate::error;
|
||||
@@ -99,7 +99,7 @@ impl BeefyKeystore {
|
||||
///
|
||||
/// Return `true` if the signature is authentic, `false` otherwise.
|
||||
pub fn verify(public: &Public, sig: &Signature, message: &[u8]) -> bool {
|
||||
BeefyVerify::<Keccak256>::verify(sig, message, public)
|
||||
BeefyAuthorityId::<Keccak256>::verify(public, sig, message)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user