File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
crates/signer/src/manager Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -659,9 +659,22 @@ fn load_distributed_accounts(
659659 continue ;
660660 } ;
661661
662+ if participant_id == 0 {
663+ warn ! (
664+ "Skiping invalid participant ID (0) for account {} in host {host_name}" ,
665+ account. name
666+ ) ;
667+ continue
668+ }
669+
662670 match consensus_accounts. get_mut ( & public_key) {
663671 Some ( Account :: Distributed ( DistributedAccount { participants, .. } ) ) => {
664- participants. insert ( participant_id as u32 , channel. clone ( ) ) ;
672+ if participants. insert ( participant_id as u32 , channel. clone ( ) ) . is_some ( ) {
673+ warn ! (
674+ "Duplicated participant ID ({participant_id}) for account {} in host {host_name}. Keeping this host" ,
675+ account. name
676+ ) ;
677+ }
665678 }
666679 None => {
667680 let Ok ( ( wallet, name) ) = decompose_name ( & account. name ) else {
You can’t perform that action at this time.
0 commit comments