mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 12:58:31 +00:00
Fix proof-of-possession issues.
These were introduced in an earlier commit
This commit is contained in:
@@ -21,14 +21,6 @@ pub const BLS_AGG_SIG_BYTE_SIZE: usize = 96;
|
||||
use hashing::hash;
|
||||
use ssz::ssz_encode;
|
||||
|
||||
/// For some signature and public key, ensure that the signature message was the public key and it
|
||||
/// was signed by the secret key that corresponds to that public key.
|
||||
pub fn verify_proof_of_possession(sig: &Signature, pubkey: &PublicKey) -> bool {
|
||||
// TODO: replace this function with state.validate_proof_of_possession
|
||||
// https://github.com/sigp/lighthouse/issues/239
|
||||
sig.verify(&ssz_encode(pubkey), 0, &pubkey)
|
||||
}
|
||||
|
||||
/// Returns the withdrawal credentials for a given public key.
|
||||
pub fn get_withdrawal_credentials(pubkey: &PublicKey, prefix_byte: u8) -> Vec<u8> {
|
||||
let hashed = hash(&ssz_encode(pubkey));
|
||||
|
||||
Reference in New Issue
Block a user