File tree Expand file tree Collapse file tree 2 files changed +26
-24
lines changed
mithril-common/src/protocol Expand file tree Collapse file tree 2 files changed +26
-24
lines changed Original file line number Diff line number Diff line change 1- use anyhow:: anyhow;
1+ use anyhow:: { Context , anyhow} ;
22use mithril_stm:: { AggregateSignatureType , Parameters } ;
33
44use crate :: {
@@ -70,19 +70,20 @@ impl MultiSigner {
7070 ) )
7171 } ) ?;
7272
73- protocol_signature. verify (
74- & self . protocol_parameters ,
75- & vk,
76- & stake,
77- & avk,
78- message. to_message ( ) . as_bytes ( ) ,
79- ) ?;
80- // .with_context(|| {
81- // format!(
82- // "Invalid signature for party: '{}'",
83- // single_signature.party_id
84- // )
85- // })?;
73+ protocol_signature
74+ . verify (
75+ & self . protocol_parameters ,
76+ & vk,
77+ & stake,
78+ & avk,
79+ message. to_message ( ) . as_bytes ( ) ,
80+ )
81+ . with_context ( || {
82+ format ! (
83+ "Invalid signature for party: '{}'" ,
84+ single_signature. party_id
85+ )
86+ } ) ?;
8687
8788 Ok ( ( ) )
8889 }
Original file line number Diff line number Diff line change @@ -49,16 +49,17 @@ impl SignerBuilder {
4949 let mut key_registration = ProtocolKeyRegistration :: init ( & stake_distribution) ;
5050
5151 for signer in registered_signers {
52- key_registration. register (
53- Some ( signer. party_id . to_owned ( ) ) ,
54- signer. operational_certificate . clone ( ) ,
55- signer. verification_key_signature ,
56- signer. kes_period ,
57- signer. verification_key ,
58- ) ?;
59- // .with_context(|| {
60- // format!("Registration failed for signer: '{}'", signer.party_id)
61- // })?;
52+ key_registration
53+ . register (
54+ Some ( signer. party_id . to_owned ( ) ) ,
55+ signer. operational_certificate . clone ( ) ,
56+ signer. verification_key_signature ,
57+ signer. kes_period ,
58+ signer. verification_key ,
59+ )
60+ . with_context ( || {
61+ format ! ( "Registration failed for signer: '{}'" , signer. party_id)
62+ } ) ?;
6263 }
6364
6465 let closed_registration = key_registration. close ( ) ;
You can’t perform that action at this time.
0 commit comments