Skip to content

Commit

Permalink
Limit archiving more strictly based on sum of me/them.archive_count.
Browse files Browse the repository at this point in the history
  • Loading branch information
moodyjon committed Jun 16, 2023
1 parent 21daa12 commit a63b37b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rust/protocol/fuzz/fuzz_targets/interaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,12 @@ fuzz_target!(|data: (u64, &[u8])| {
};
match action >> 1 {
0 => {
if me.archive_count < 40 {
if me.archive_count + them.archive_count < 40 {
// Only archive if it can't result in old sessions getting expired.
// We're not testing that.
me.archive_session(&them.address).await
} else {
info!("{}: archiving LIMITED at {}/{}", me.name, me.archive_count, them.archive_count);
}
}
1..=32 => me.receive_messages(&them.address, &mut csprng).await,
Expand Down

0 comments on commit a63b37b

Please sign in to comment.