mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-24 15:35:34 -04:00
Eliminate BootstrapNodes#DIGITAL_OCEAN_1_DEV
Instead of including testing-related bootstrap nodes in the BootstrapNodes class, this change introduces a Node#withPort method that allows for obtaining a copy of an existing bootstrap node (e.g. DIGITAL_OCEAN_1) with a modified port value. This approach to `with*` methods allows for convenient customization of value types without sacrificing immutability. See [1] for details. [1]: http://blog.joda.org/2014/03/valjos-value-java-objects.html
This commit is contained in:
parent
5ab837658b
commit
adfd8b2ac4
3 changed files with 8 additions and 2 deletions
|
@ -89,7 +89,7 @@ public class TomP2PTests {
|
|||
// 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;
|
||||
BootstrapNodes.LOCALHOST : BootstrapNodes.DIGITAL_OCEAN_1.withPort(7367);
|
||||
|
||||
private static final PeerAddress BOOTSTRAP_NODE_ADDRESS;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue