Removed unused timestamp value.

This commit is contained in:
CalDescent 2022-10-28 15:50:43 +01:00
parent f83d4bac7b
commit 510328db47
2 changed files with 4 additions and 4 deletions

View File

@ -1072,7 +1072,7 @@ public class Block {
// Validate the rest
for (OnlineAccountData onlineAccount : onlineAccounts)
if (!OnlineAccountsManager.getInstance().verifyMemoryPoW(onlineAccount, this.blockData.getTimestamp()))
if (!OnlineAccountsManager.getInstance().verifyMemoryPoW(onlineAccount))
return ValidationResult.ONLINE_ACCOUNT_NONCE_INCORRECT;
// Extract online accounts' timestamp signatures from block data. Only one signature if aggregated.

View File

@ -339,7 +339,7 @@ public class OnlineAccountsManager {
}
// Validate mempow
if (!getInstance().verifyMemoryPoW(onlineAccountData, now)) {
if (!getInstance().verifyMemoryPoW(onlineAccountData)) {
LOGGER.trace(() -> String.format("Rejecting online reward-share for account %s due to invalid PoW nonce", mintingAccount.getAddress()));
return false;
}
@ -582,7 +582,7 @@ public class OnlineAccountsManager {
OnlineAccountData ourOnlineAccountData = new OnlineAccountData(onlineAccountsTimestamp, signature, publicKey, nonce);
// Make sure to verify before adding
if (verifyMemoryPoW(ourOnlineAccountData, NTP.getTime())) {
if (verifyMemoryPoW(ourOnlineAccountData)) {
ourOnlineAccounts.add(ourOnlineAccountData);
}
}
@ -637,7 +637,7 @@ public class OnlineAccountsManager {
return nonce;
}
public boolean verifyMemoryPoW(OnlineAccountData onlineAccountData, Long timestamp) {
public boolean verifyMemoryPoW(OnlineAccountData onlineAccountData) {
// Require a valid nonce value
if (onlineAccountData.getNonce() == null || onlineAccountData.getNonce() < 0) {
return false;