You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DefaultLeaderElector::elect_leader (specifically, hash_to_range) panics for party_weights = vec![1] (or summing to 1):
#[test]fntest_total_weight_1(){letmut party = MockParty::default();
party.cfg.party_weights = vec![1];let elector = DefaultLeaderElector::new();dbg!(elector.elect_leader(&party).unwrap());}
Note that while some of the scenarios above may not be really realistic in terms of BPCon, still given the general purpose of this it would be better to have safeguards in place to avoid runtime panics.
The text was updated successfully, but these errors were encountered:
DefaultLeaderElector::elect_leader
(specifically,hash_to_range
) panics forparty_weights = vec![1]
(or summing to 1):Note that while some of the scenarios above may not be really realistic in terms of BPCon, still given the general purpose of this it would be better to have safeguards in place to avoid runtime panics.
The text was updated successfully, but these errors were encountered: