Browse Source

Fixed bug in isMemoryPoWActive() which affected the ability to enable mempow via settings.

online-accounts-mempow-v2
CalDescent 2 years ago
parent
commit
4ca174fa0b
  1. 6
      src/main/java/org/qortal/controller/OnlineAccountsManager.java

6
src/main/java/org/qortal/controller/OnlineAccountsManager.java

@ -584,10 +584,10 @@ public class OnlineAccountsManager {
private boolean isMemoryPoWActive() {
Long now = NTP.getTime();
if (now < BlockChain.getInstance().getOnlineAccountsMemoryPoWTimestamp() || Settings.getInstance().isOnlineAccountsMemPoWEnabled()) {
return false;
if (now >= BlockChain.getInstance().getOnlineAccountsMemoryPoWTimestamp() || Settings.getInstance().isOnlineAccountsMemPoWEnabled()) {
return true;
}
return true;
return false;
}
private byte[] getMemoryPoWBytes(byte[] publicKey, long onlineAccountsTimestamp) throws IOException {
byte[] timestampBytes = Longs.toByteArray(onlineAccountsTimestamp);

Loading…
Cancel
Save