diff --git a/.changeset/long-jobs-decide.md b/.changeset/long-jobs-decide.md new file mode 100644 index 0000000..00af590 --- /dev/null +++ b/.changeset/long-jobs-decide.md @@ -0,0 +1,5 @@ +--- +'uhttp-exit-app': patch +--- + +Fix current relay nodes compatibility version diff --git a/src/index.ts b/src/index.ts index 8b412ce..b536fe0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -20,7 +20,7 @@ import Version from './version'; const SocketReconnectTimeout = 1e3; // 1sek const RequestPurgeTimeout = 60e3; // 60sek const ValidCounterPeriod = 1e3 * 60 * 60; // 1hour -const RelayNodesCompatVersions = ['3.']; +const RelayNodesCompatVersions = ['2.1']; const SetupRelayPeriod = 1e3 * 60 * 15; // 15 min type State = { @@ -505,7 +505,7 @@ function sendResponse( const rpcMethod = determineRPCmethod(reqPayload.body); const quotaRequest: DpApi.QuotaParams = { clientId: reqPayload.clientId, - rpcMethod: rpcMethod, + rpcMethod, segmentCount: cacheEntry.count, lastSegmentLength: lastReqSeg.body.length, chainId: reqPayload.chainId, @@ -515,7 +515,7 @@ function sendResponse( const lastRespSeg = segments[segments.length - 1]; const quotaResponse: DpApi.QuotaParams = { clientId: reqPayload.clientId, - rpcMethod: rpcMethod, + rpcMethod, segmentCount: segments.length, lastSegmentLength: lastRespSeg.body.length, chainId: reqPayload.chainId,