add HavenoUtils.isSeedNode()
This commit is contained in:
parent
1a981f28df
commit
df27902577
@ -519,7 +519,7 @@ public final class XmrConnectionService {
|
||||
private void maybeStartLocalNode() {
|
||||
|
||||
// skip if seed node
|
||||
if (HavenoUtils.havenoSetup == null) return;
|
||||
if (HavenoUtils.isSeedNode()) return;
|
||||
|
||||
// start local node if offline and used as last connection
|
||||
if (connectionManager.getConnection() != null && xmrLocalNode.equalsUri(connectionManager.getConnection().getUri()) && !xmrLocalNode.isDetected() && !xmrLocalNode.shouldBeIgnored()) {
|
||||
|
@ -74,6 +74,10 @@ public class HavenoUtils {
|
||||
public static ArbitrationManager arbitrationManager;
|
||||
public static HavenoSetup havenoSetup;
|
||||
|
||||
public static boolean isSeedNode() {
|
||||
return havenoSetup == null;
|
||||
}
|
||||
|
||||
// ----------------------- CONVERSION UTILS -------------------------------
|
||||
|
||||
public static BigInteger coinToAtomicUnits(Coin coin) {
|
||||
|
@ -428,7 +428,7 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi
|
||||
}
|
||||
|
||||
// process after all wallets initialized
|
||||
if (HavenoUtils.havenoSetup != null) { // null for seednode
|
||||
if (!HavenoUtils.isSeedNode()) {
|
||||
|
||||
// maybe remove trades on error
|
||||
for (Trade trade : tradesToMaybeRemoveOnError) {
|
||||
|
Loading…
Reference in New Issue
Block a user