Skip to content

Commit

Permalink
patch panic
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedilger committed Aug 6, 2024
1 parent fd2197c commit 52263fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gossip-lib/src/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub fn get_all_pubkey_inboxes(pubkey: PublicKey) -> Result<Vec<RelayUrl>, Error>
.collect();

let num = GLOBALS.storage.read_setting_num_relays_per_person() as usize;
let how_many_more = num - relays.len();
let how_many_more = num.saturating_sub(relays.len());
if how_many_more > 0 {
// substitute our write relays
let additional: Vec<(RelayUrl, f32)> = GLOBALS
Expand Down

0 comments on commit 52263fe

Please sign in to comment.