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.
This commit is contained in:
CalDescent 2022-09-04 13:19:32 +01:00
parent 23423102e7
commit 2a0d5746e6

View File

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