Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion protocols/gossipsub/src/behaviour/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2185,7 +2185,7 @@ fn test_unsubscribe_backoff() {
.backoff_slack(1)
// ensure a prune_backoff > unsubscribe_backoff
.prune_backoff(Duration::from_secs(5))
.unsubscribe_backoff(1)
.unsubscribe_backoff(Duration::from_secs(1))
.heartbeat_interval(HEARTBEAT_INTERVAL)
.build()
.unwrap();
Expand Down
4 changes: 2 additions & 2 deletions protocols/gossipsub/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -865,8 +865,8 @@ impl ConfigBuilder {
/// This is how long to wait before resubscribing to the topic. A short backoff period in case
/// of an unsubscribe event allows reaching a healthy mesh in a more timely manner. The default
/// is 10 seconds.
pub fn unsubscribe_backoff(&mut self, unsubscribe_backoff: u64) -> &mut Self {
self.config.unsubscribe_backoff = Duration::from_secs(unsubscribe_backoff);
pub fn unsubscribe_backoff(&mut self, unsubscribe_backoff: Duration) -> &mut Self {
self.config.unsubscribe_backoff = unsubscribe_backoff;
self
}

Expand Down
Loading