ignore latency mismatches

This commit is contained in:
Para Dox
2025-06-02 00:28:18 +07:00
parent 1d11e27cda
commit 9ef4a1f02d
2 changed files with 2 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ const config = {
// Logging
logMismatches: process.env.LOG_MISMATCHES !== 'false', // default true
logAllMismatchedResponses: process.env.LOG_ALL_MISMATCHED_RESPONSES === 'true', // default false
ignoreLatencyMismatches: process.env.IGNORE_LATENCY_MISMATCHES === 'true', // default false
// Server
port: parseInt(process.env.PORT || '8545', 10),

View File

@@ -732,7 +732,7 @@ class RPCProxy {
// Check latency difference
const latencyDiff = compareResponse.latency - streamResponse.latency;
if (latencyDiff > config.latencyThresholdMs) {
if (!config.ignoreLatencyMismatches && latencyDiff > config.latencyThresholdMs) {
mismatches.push({
type: 'latency',
streamLatency: streamResponse.latency,