Browse Source

Only compute "next" online account signature if mempow hard fork is active.

This minimizes the amount of differences in the first phase of the mempow rollout.
online-accounts-mempow-v2-block-updates
CalDescent 2 years ago
parent
commit
2a0d5746e6
  1. 12
      src/main/java/org/qortal/controller/OnlineAccountsManager.java

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

@ -462,12 +462,14 @@ public class OnlineAccountsManager {
return;
}
// 'next' timestamp (prioritize this as it's the most important)
// 'next' timestamp (prioritize this as it's the most important, if mempow active)
final long nextOnlineAccountsTimestamp = toOnlineAccountTimestamp(now) + getOnlineTimestampModulus();
boolean success = computeOurAccountsForTimestamp(nextOnlineAccountsTimestamp);
if (!success) {
// We didn't compute the required nonce value(s), and so can't proceed until they have been retried
return;
if (nextOnlineAccountsTimestamp >= BlockChain.getInstance().getOnlineAccountsMemoryPoWTimestamp()) {
boolean success = computeOurAccountsForTimestamp(nextOnlineAccountsTimestamp);
if (!success) {
// We didn't compute the required nonce value(s), and so can't proceed until they have been retried
return;
}
}
// 'current' timestamp

Loading…
Cancel
Save