mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-24 15:35:34 -04:00
Rename app.cli.{SeedNode => BootstrapNode}
With this commit we're now using the naming "bootstrap node" everywhere as opposed to the more fuzzy notion of "seed node" (which was originally borrowed from Bitcoin Core, but doesn't really describe what we're up to very well. As it turns out, Kademlia also uses the terminology "bootstrap node" [1], so we're in good company with this change. [1]: https://en.wikipedia.org/wiki/Kademlia#Joining_the_network
This commit is contained in:
parent
117b4ce5dc
commit
56409c0177
7 changed files with 22 additions and 36 deletions
|
@ -70,7 +70,7 @@ import static org.junit.Assert.*;
|
|||
* Test bootstrapping, DHT operations like put/get/add/remove and sendDirect in both LAN and WAN environment
|
||||
* Test scenarios in direct connection, auto port forwarding or relay mode.
|
||||
* <p>
|
||||
* To start a seed node code use the {@link io.bitsquare.app.cli.SeedNode} class.
|
||||
* To start a bootstrap node code use the {@link io.bitsquare.app.cli.BootstrapNode} class.
|
||||
* <p>
|
||||
* To configure your test environment edit the static fields for id, IP and port.
|
||||
* In the configure method and the connectionType you can define your test scenario.
|
||||
|
@ -86,11 +86,10 @@ public class TomP2PTests {
|
|||
// If you want to test in one specific connection mode define it directly, otherwise use UNKNOWN
|
||||
private static final ConnectionType FORCED_CONNECTION_TYPE = ConnectionType.NAT;
|
||||
|
||||
// Typically you run the seed node in localhost to test direct connection.
|
||||
// If you have a setup where you are not behind a router you can also use a WAN side seed node.
|
||||
private static final Node BOOTSTRAP_NODE =
|
||||
(FORCED_CONNECTION_TYPE == ConnectionType.DIRECT) ? BootstrapNodes.LOCALHOST : BootstrapNodes
|
||||
.DIGITAL_OCEAN_1_DEV;
|
||||
// Typically you run the bootstrap node on localhost to test direct connection.
|
||||
// If you have a setup where you are not behind a router you can also use a WAN bootstrap node.
|
||||
private static final Node BOOTSTRAP_NODE = (FORCED_CONNECTION_TYPE == ConnectionType.DIRECT) ?
|
||||
BootstrapNodes.LOCALHOST : BootstrapNodes.DIGITAL_OCEAN_1_DEV;
|
||||
|
||||
private static final PeerAddress BOOTSTRAP_NODE_ADDRESS;
|
||||
|
||||
|
@ -290,11 +289,11 @@ public class TomP2PTests {
|
|||
}
|
||||
}
|
||||
|
||||
// That test should always succeed as we use the server seed node as receiver.
|
||||
// This test should always succeed as we use the bootstrap node as receiver.
|
||||
// A node can send a message to another peer which is not in the same LAN.
|
||||
@Test
|
||||
@Repeat(STRESS_TEST_COUNT)
|
||||
public void testSendDirectToSeedNode() throws Exception {
|
||||
public void testSendDirectToBootstrapNode() throws Exception {
|
||||
peer1DHT = getDHTPeer("node_1", client1Port);
|
||||
FuturePeerConnection futurePeerConnection =
|
||||
peer1DHT.peer().createPeerConnection(BOOTSTRAP_NODE_ADDRESS, 500);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue