Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions protocols/gossipsub/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
- Remove `Rpc` from the public API.
See [PR 6091](https://github.com/libp2p/rust-libp2p/pull/6091)

- Fix `unsubscribe_backoff` expecting number of seconds instead of `Duration`
See [PR 6124](https://github.com/libp2p/rust-libp2p/pull/6124)

## 0.49.2

- Relax `Behaviour::with_metrics` requirements, do not require DataTransform and TopicSubscriptionFilter to also impl Default
Expand Down
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 @@ -858,8 +858,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