Skip to content

Commit

Permalink
refactoring todos
Browse files Browse the repository at this point in the history
  • Loading branch information
coax1d committed Nov 14, 2024
1 parent 2334b58 commit ccfee52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions substrate/primitives/application-crypto/src/bls381.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,8 @@ impl RuntimePublic for Public {
}

fn generate_pop(&mut self, key_type: KeyTypeId) -> Option<Self::Signature> {
let pub_key_as_bytes = self.to_raw_vec();
let pop_context_tag: &[u8] = b"POP_";
let pop_statement = [pop_context_tag, pub_key_as_bytes.as_slice()].concat();
sp_io::crypto::bls381_sign(key_type, self, pop_statement.as_slice())
// TODO: Add host function
// sp_io::crypto::generate_pop()
}

fn verify_pop(&self, pop: &Self::Signature) -> bool {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl RuntimePublic for Public {
}

fn generate_pop(&mut self, key_type: KeyTypeId) -> Option<Self::Signature> {
// TODO: Implement Special Case
// TODO: Implement Special Case by calling both pop generations
None
}

Expand Down

0 comments on commit ccfee52

Please sign in to comment.