Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protocols/gossipsub: Fix elided lifetime on gossipsub config builder #2409

Merged
merged 4 commits into from
Dec 30, 2021
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 @@ -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