mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Fix wrong network ID for dash
This commit is contained in:
parent
9974aea867
commit
ea8cbc111c
@ -33,8 +33,7 @@ public class CoreSeedNodesRepository implements SeedNodesRepository {
|
|||||||
List<String> bannedNodes = bisqEnvironment.getBannedSeedNodes();
|
List<String> bannedNodes = bisqEnvironment.getBannedSeedNodes();
|
||||||
Set<NodeAddress> nodeAddresses;
|
Set<NodeAddress> nodeAddresses;
|
||||||
if (seedNodes != null && !seedNodes.isEmpty()) {
|
if (seedNodes != null && !seedNodes.isEmpty()) {
|
||||||
nodeAddresses = Arrays.asList(StringUtils.deleteWhitespace(seedNodes).split(","))
|
nodeAddresses = Arrays.stream(StringUtils.deleteWhitespace(seedNodes).split(","))
|
||||||
.stream()
|
|
||||||
.map(NodeAddress::new)
|
.map(NodeAddress::new)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
} else {
|
} else {
|
||||||
@ -116,8 +115,8 @@ public class CoreSeedNodesRepository implements SeedNodesRepository {
|
|||||||
new NodeAddress("pklgy3vdfn3obkur.onion:8003"),
|
new NodeAddress("pklgy3vdfn3obkur.onion:8003"),
|
||||||
|
|
||||||
// DASH mainnet
|
// DASH mainnet
|
||||||
new NodeAddress("toeu5ikb27ydscxt.onion:8009"),
|
new NodeAddress("toeu5ikb27ydscxt.onion:8006"),
|
||||||
new NodeAddress("ae4yvaivhnekkhqf.onion:8009")
|
new NodeAddress("ae4yvaivhnekkhqf.onion:8006")
|
||||||
);
|
);
|
||||||
|
|
||||||
// Addresses are used if the last digit of their port match the network id:
|
// Addresses are used if the last digit of their port match the network id:
|
||||||
@ -163,6 +162,6 @@ public class CoreSeedNodesRepository implements SeedNodesRepository {
|
|||||||
|
|
||||||
public boolean isSeedNode(NodeAddress nodeAddress) {
|
public boolean isSeedNode(NodeAddress nodeAddress) {
|
||||||
return Stream.concat(localhostSeedNodeAddresses.stream(), torSeedNodeAddresses.stream())
|
return Stream.concat(localhostSeedNodeAddresses.stream(), torSeedNodeAddresses.stream())
|
||||||
.filter(e -> e.equals(nodeAddress)).findAny().isPresent();
|
.anyMatch(e -> e.equals(nodeAddress));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user