From 8b4bc5850f8c7017116b211e739312d46c17ab3d Mon Sep 17 00:00:00 2001 From: jsy1218 <91580504+jsy1218@users.noreply.github.com> Date: Mon, 15 Jul 2024 20:52:39 +0200 Subject: [PATCH] fix: differentiate between quicknode geth vs quicknode reth metrics --- lib/rpc/UniJsonRpcProvider.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/rpc/UniJsonRpcProvider.ts b/lib/rpc/UniJsonRpcProvider.ts index 4bcc0116db..ff7e5add54 100644 --- a/lib/rpc/UniJsonRpcProvider.ts +++ b/lib/rpc/UniJsonRpcProvider.ts @@ -276,9 +276,11 @@ export class UniJsonRpcProvider extends StaticJsonRpcProvider { case CALL_METHOD_NAME: // if it's eth_call, then we know the response data type is string, so we can compare directly if (providerResponse !== evaluatedProviderResponse) { + // create a bogus error object to get the call stack + const error = new Error() this.log.error( { methodName, args }, - `Provider response mismatch: ${providerResponse} from ${selectedProvider.providerId} vs ${evaluatedProviderResponse} from ${otherProvider.providerId}` + `Provider response mismatch: ${providerResponse} from ${selectedProvider.providerId} vs ${evaluatedProviderResponse} from ${otherProvider.providerId}. Call stack ${error.stack}` ) selectedProvider.logRpcResponseMismatch(methodName, otherProvider) } else {