forked from Qortal-Forker/qortal
Don't process trade bots or broadcast presence timestamps if our chain is more than 30 minutes old
This commit is contained in:
@@ -239,6 +239,11 @@ public class TradeBot implements Listener {
|
|||||||
if (!(event instanceof Synchronizer.NewChainTipEvent))
|
if (!(event instanceof Synchronizer.NewChainTipEvent))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Don't process trade bots or broadcast presence timestamps if our chain is more than 30 minutes old
|
||||||
|
final Long minLatestBlockTimestamp = NTP.getTime() - (30 * 60 * 1000L);
|
||||||
|
if (!Controller.getInstance().isUpToDate(minLatestBlockTimestamp))
|
||||||
|
return;
|
||||||
|
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
expireOldPresenceTimestamps();
|
expireOldPresenceTimestamps();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user