Ensure all online accounts timestamps are a multiple of the online timestamp modulus.

This is a simple way to discard the 5-minute online account timestamps (from out of date nodes) once the switch to 30-minute online account timestamps has taken place.
This commit is contained in:
CalDescent 2022-07-30 18:15:16 +01:00
parent fe9744eec6
commit 55f973af3c

View File

@ -217,6 +217,11 @@ public class OnlineAccountsManager {
return false;
}
// Check timestamp is a multiple of online timestamp modulus
if (onlineAccountTimestamp % getOnlineTimestampModulus() != 0) {
return false;
}
// Verify signature
byte[] data = Longs.toByteArray(onlineAccountData.getTimestamp());
boolean isSignatureValid = onlineAccountTimestamp >= BlockChain.getInstance().getAggregateSignatureTimestamp()