@@ -818,21 +818,9 @@ impl Tx {
818
818
signatures : BTreeMap :: new ( ) ,
819
819
signer : Signer :: PubKeys ( vec ! [ ] ) ,
820
820
} ;
821
- let mut sections = HashMap :: new ( ) ;
822
821
// Put the supplied signatures into the correct sections
823
822
for signature in signatures {
824
- if let Some ( ( addr, idx) ) = & signature. index {
825
- // Add the signature under the given multisig address
826
- let section =
827
- sections. entry ( addr. clone ( ) ) . or_insert_with ( || {
828
- Authorization {
829
- targets : vec ! [ self . raw_header_hash( ) ] ,
830
- signatures : BTreeMap :: new ( ) ,
831
- signer : Signer :: Address ( addr. clone ( ) ) ,
832
- }
833
- } ) ;
834
- section. signatures . insert ( * idx, signature. signature ) ;
835
- } else if let Signer :: PubKeys ( pks) = & mut pk_section. signer {
823
+ if let Signer :: PubKeys ( pks) = & mut pk_section. signer {
836
824
// Add the signature under its corresponding public key
837
825
pk_section. signatures . insert (
838
826
u8:: try_from ( pks. len ( ) )
@@ -842,10 +830,7 @@ impl Tx {
842
830
pks. push ( signature. pubkey ) ;
843
831
}
844
832
}
845
- for section in std:: iter:: once ( pk_section) . chain ( sections. into_values ( ) )
846
- {
847
- self . add_section ( Section :: Authorization ( section) ) ;
848
- }
833
+ self . add_section ( Section :: Authorization ( pk_section) ) ;
849
834
self
850
835
}
851
836
0 commit comments