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

This commit is contained in:
CalDescent 2022-07-02 13:45:39 +01:00
parent 294582f136
commit 4ca174fa0b

View File

@ -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);