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. 4
      src/main/java/org/qortal/controller/OnlineAccountsManager.java

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

@ -462,13 +462,15 @@ public class OnlineAccountsManager {
return; 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(); final long nextOnlineAccountsTimestamp = toOnlineAccountTimestamp(now) + getOnlineTimestampModulus();
if (nextOnlineAccountsTimestamp >= BlockChain.getInstance().getOnlineAccountsMemoryPoWTimestamp()) {
boolean success = computeOurAccountsForTimestamp(nextOnlineAccountsTimestamp); boolean success = computeOurAccountsForTimestamp(nextOnlineAccountsTimestamp);
if (!success) { if (!success) {
// We didn't compute the required nonce value(s), and so can't proceed until they have been retried // We didn't compute the required nonce value(s), and so can't proceed until they have been retried
return; return;
} }
}
// 'current' timestamp // 'current' timestamp
computeOurAccountsForTimestamp(onlineAccountsTimestamp); computeOurAccountsForTimestamp(onlineAccountsTimestamp);

Loading…
Cancel
Save