DEEP-37 Fixed bug in anomaly reporting

This commit is contained in:
Andrey Shabarshov 2023-07-25 17:22:17 +01:00
parent 241d7d434a
commit fb50477521

View File

@ -32,7 +32,7 @@ internal class AnomalyBase
protected bool IsActive()
{
if (DateTime.UtcNow < _anomalyEnd)
if (DateTime.Now < _anomalyEnd)
{
return true;
}
@ -44,7 +44,7 @@ internal class AnomalyBase
if (_anomalyActive)
{
_anomalyActive = false;
// _anomalyReporter.Report(_anomalyStart, _anomalyEnd, "Unconfirmed transaction");
_anomalyReporter.Report(_anomalyStart, _anomalyEnd, Name);
_logger.LogWarning($"Anomaly:{Name} ended");
}
}
@ -61,7 +61,7 @@ internal class AnomalyBase
_anomalyEnd = _anomalyStart + _anomalyDuration;
_anomalyActive = true;
_logger.LogWarning($"Anomaly: {Name}. Dice={dice} Ends=\"{_anomalyEnd.ToLocalTime():s}\"");
_anomalyReporter.Report(_anomalyStart, _anomalyEnd, $"{Name}");
//_anomalyReporter.Report(_anomalyStart, _anomalyEnd, $"{Name}");
}
}
return true;