Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
4 changes: 4 additions & 0 deletions protocols/gossipsub/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
- Fix mesh not being constructed even when not adding any peer.
See [PR 6100](https://github.com/libp2p/rust-libp2p/pull/6100)

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


## 0.49.0

- Feature gate metrics related code. This changes some `Behaviour` constructor methods.
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