Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BootstrapOptions added to SwarmOptions
Default removed from searchDepth
- Loading branch information
1 parent
2086fb9
commit 831c2b5
Showing
6 changed files
with
53 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using System.Collections.Immutable; | ||
using Libplanet.Net.Messages; | ||
using Libplanet.Net.Protocols; | ||
using Libplanet.Net.Transports; | ||
|
||
namespace Libplanet.Net | ||
{ | ||
public class BootstrapOptions | ||
{ | ||
public const int DefaultDialTimeout = 15; | ||
|
||
/// <summary> | ||
/// Determines how long an <see cref="ITransport"/> should wait before timimg out | ||
/// when dialing peers for either <see cref="Pong"/>, <see cref="Neighbors"/>, | ||
/// or <see cref="ChainStatus"/> during a bootstrapping phase. Generally, a more relaxed | ||
/// <see cref="TimeSpan"/> is used compared to <see cref="TimeoutOptions.DialTimeout"/>. | ||
/// Set to <see cref="DefaultDialTimeout"/> seconds by default. | ||
/// </summary> | ||
/// <seealso cref="TimeoutOptions.DialTimeout"/> | ||
public TimeSpan DialTimeout { get; set; } | ||
= TimeSpan.FromSeconds(DefaultDialTimeout); | ||
|
||
/// <summary> | ||
/// The list of seed peers to connect to. | ||
/// </summary> | ||
public ImmutableList<BoundPeer> SeedPeers { get; set; } = ImmutableList<BoundPeer>.Empty; | ||
|
||
/// <summary> | ||
/// Determines the depth of the search when discovering neighbors for the local node. | ||
/// </summary> | ||
public int SearchDepth { get; set; } = Kademlia.MaxDepth; | ||
} | ||
} |
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