This repository has been archived by the owner on Oct 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
406: fix restore_bootstrappers doesn't enable content discovery r=koivunej a=koivunej Fixes #405 and also: - makes sure ipfs.restore_bootstrappers is used in the `dht_popular_content_discovery` test - adds a test case making sure we can parse all config::BOOTSTRAP_NODES - ~adds some FIXMEs we couldn't decide yet on the other /bootstrap impl~ handled - expose ipfs::config to allow http to access ipfs::config::BOOTSTRAP_NODES to enable the http api semantics - keep exposing the delta semantics in ipfs.restore_bootstrappers - use ipfs.restore_bootstrappers in examples/fetch_and_cat.rs via new `--default-bootstrappers` option/mode - add tracing to *_bootstrapper methods Co-authored-by: Joonas Koivunen <joonas@equilibrium.co> Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com>
- Loading branch information
Showing
7 changed files
with
156 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,20 @@ | ||
//! Static configuration (the bootstrap node(s)). | ||
/// The supported bootstrap nodes (/dnsaddr is not yet supported). This will be updated to contain | ||
/// the latest known supported IPFS bootstrap peers. | ||
// FIXME: it would be nice to parse these into MultiaddrWithPeerId with const fn. | ||
pub const BOOTSTRAP_NODES: &[&str] = | ||
&["/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"]; | ||
|
||
#[cfg(test)] | ||
mod tests { | ||
use crate::p2p::MultiaddrWithPeerId; | ||
|
||
#[test] | ||
fn bootstrap_nodes_are_multiaddr_with_peerid() { | ||
super::BOOTSTRAP_NODES | ||
.iter() | ||
.try_for_each(|s| s.parse::<MultiaddrWithPeerId>().map(|_| ())) | ||
.unwrap(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters