mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-02 11:46:11 -04:00
Extract constant with regtest network id
This commit is contained in:
parent
30e980748d
commit
f238870bce
1 changed files with 4 additions and 3 deletions
|
@ -21,6 +21,8 @@ import java.util.Set;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
|
|
||||||
public class NetworkStressTest {
|
public class NetworkStressTest {
|
||||||
|
private static final int REGTEST_NETWORK_ID = 2;
|
||||||
|
|
||||||
/** A directory to temporarily hold seed and normal nodes' configuration and state files. */
|
/** A directory to temporarily hold seed and normal nodes' configuration and state files. */
|
||||||
private Path tempDir;
|
private Path tempDir;
|
||||||
/** A single seed node that other nodes will contact to request initial data. */
|
/** A single seed node that other nodes will contact to request initial data. */
|
||||||
|
@ -43,9 +45,8 @@ public class NetworkStressTest {
|
||||||
final Set<NodeAddress> seedNodes = new HashSet<>(1);
|
final Set<NodeAddress> seedNodes = new HashSet<>(1);
|
||||||
seedNodes.add(seedNodeAddress); // the only seed node in tests
|
seedNodes.add(seedNodeAddress); // the only seed node in tests
|
||||||
seedNode.createAndStartP2PService(seedNodeAddress, useLocalhost,
|
seedNode.createAndStartP2PService(seedNodeAddress, useLocalhost,
|
||||||
2 /*regtest*/, true /*detailed logging*/, seedNodes,
|
REGTEST_NETWORK_ID, true /*detailed logging*/, seedNodes,
|
||||||
getSetupListener(setupFailed, pendingTasks)
|
getSetupListener(setupFailed, pendingTasks));
|
||||||
);
|
|
||||||
|
|
||||||
// Wait for concurrent tasks to finish.
|
// Wait for concurrent tasks to finish.
|
||||||
pendingTasks.await();
|
pendingTasks.await();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue