Skip to content

Commit

Permalink
protocols/gossipsub: Fix elided lifetime on gossipsub config builder (#…
Browse files Browse the repository at this point in the history
…2409)

Co-authored-by: Max Inden <mail@max-inden.de>
  • Loading branch information
laptou and mxinden authored Dec 30, 2021
1 parent b4468d7 commit 3749dd5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions protocols/gossipsub/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
- Improve bandwidth performance by tracking IWANTs and reducing duplicate sends
(see [PR 2327]).

- Fix `GossipsubConfigBuilder::build()` requiring `&self` to live for `'static` (see [PR 2409])

[PR 2346]: https://github.com/libp2p/rust-libp2p/pull/2346
[PR 2339]: https://github.com/libp2p/rust-libp2p/pull/2339
[PR 2327]: https://github.com/libp2p/rust-libp2p/pull/2327
[PR 2409]: https://github.com/libp2p/rust-libp2p/pull/2409

# 0.34.0 [2021-11-16]

Expand Down
2 changes: 1 addition & 1 deletion protocols/gossipsub/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ impl GossipsubConfigBuilder {
}

/// Constructs a [`GossipsubConfig`] from the given configuration and validates the settings.
pub fn build(&self) -> Result<GossipsubConfig, &str> {
pub fn build(&self) -> Result<GossipsubConfig, &'static str> {
// check all constraints on config

if self.config.max_transmit_size < 100 {
Expand Down

0 comments on commit 3749dd5

Please sign in to comment.