forked from Qortal/qortal
Small refactor
This commit is contained in:
parent
f7fe91abeb
commit
6f0a0ef324
@ -276,7 +276,9 @@ public class OnlineAccountsManager extends Thread {
|
||||
|
||||
private void sendOurOnlineAccountsInfo() {
|
||||
final Long now = NTP.getTime();
|
||||
if (now != null) {
|
||||
if (now == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<MintingAccountData> mintingAccounts;
|
||||
try (final Repository repository = RepositoryManager.getRepository()) {
|
||||
@ -306,7 +308,7 @@ public class OnlineAccountsManager extends Thread {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (++i > 2) {
|
||||
if (++i > 1+1) {
|
||||
iterator.remove();
|
||||
continue;
|
||||
}
|
||||
@ -368,7 +370,6 @@ public class OnlineAccountsManager extends Thread {
|
||||
|
||||
LOGGER.trace(() -> String.format("Broadcasted %d online account%s with timestamp %d", ourOnlineAccounts.size(), (ourOnlineAccounts.size() != 1 ? "s" : ""), onlineAccountsTimestamp));
|
||||
}
|
||||
}
|
||||
|
||||
public static long toOnlineAccountTimestamp(long timestamp) {
|
||||
return (timestamp / ONLINE_TIMESTAMP_MODULUS) * ONLINE_TIMESTAMP_MODULUS;
|
||||
|
Loading…
Reference in New Issue
Block a user