@@ -193,7 +193,8 @@ pub trait MultiSigner: Sync + Send {
193
193
194
194
/// Creates a multi signature from single signatures
195
195
async fn create_multi_signature (
196
- & mut self ,
196
+ & self ,
197
+ message : & entities:: ProtocolMessage ,
197
198
) -> Result < Option < ProtocolMultiSignature > , ProtocolError > ;
198
199
}
199
200
@@ -588,14 +589,10 @@ impl MultiSigner for MultiSignerImpl {
588
589
589
590
/// Creates a multi signature from single signatures
590
591
async fn create_multi_signature (
591
- & mut self ,
592
+ & self ,
593
+ message : & entities:: ProtocolMessage ,
592
594
) -> Result < Option < ProtocolMultiSignature > , ProtocolError > {
593
595
debug ! ( "Create multi signature" ) ;
594
- let message = & self
595
- . get_current_message ( )
596
- . await
597
- . ok_or_else ( ProtocolError :: UnavailableMessage ) ?;
598
-
599
596
let beacon = self
600
597
. current_beacon
601
598
. as_ref ( )
@@ -892,7 +889,7 @@ mod tests {
892
889
893
890
// No signatures registered: multi-signer can't create the multi-signature
894
891
assert ! ( multi_signer
895
- . create_multi_signature( )
892
+ . create_multi_signature( & message )
896
893
. await
897
894
. expect( "create multi signature should not fail" )
898
895
. is_none( ) ) ;
@@ -905,7 +902,7 @@ mod tests {
905
902
. expect ( "register single signature should not fail" ) ;
906
903
}
907
904
assert ! ( multi_signer
908
- . create_multi_signature( )
905
+ . create_multi_signature( & message )
909
906
. await
910
907
. expect( "create multi signature should not fail" )
911
908
. is_none( ) ) ;
@@ -919,7 +916,7 @@ mod tests {
919
916
}
920
917
assert ! (
921
918
multi_signer
922
- . create_multi_signature( )
919
+ . create_multi_signature( & message )
923
920
. await
924
921
. expect( "create multi signature should not fail" )
925
922
. is_some( ) ,
0 commit comments