| 135 | } |
| 136 | |
| 137 | bool debug_checkVersionTime(int64_t version, double t, std::string context, Severity sev) { |
| 138 | if (!g_network->isSimulated() || !g_simulator.extraDatabases.empty()) |
| 139 | return false; |
| 140 | if (!timedVersionsValidationData.count(version)) { |
| 141 | TraceEvent(SevWarn, (context + "UnknownTime").c_str()) |
| 142 | .detail("VersionChecking", version) |
| 143 | .detail("TimeChecking", t); |
| 144 | return false; |
| 145 | } |
| 146 | if (t > timedVersionsValidationData[version]) { |
| 147 | TraceEvent(sev, (context + "VersionTimeError").c_str()) |
| 148 | .detail("VersionChecking", version) |
| 149 | .detail("TimeChecking", t) |
| 150 | .detail("MaxTime", timedVersionsValidationData[version]); |
| 151 | return true; |
| 152 | } |
| 153 | return false; |
| 154 | } |
no test coverage detected