Skip to content

Commit

Permalink
fix exit node relay finding (#12)
Browse files Browse the repository at this point in the history
* fix relay nodes compat version

* prepare deployment

* revert package.json
  • Loading branch information
esterlus authored Jun 11, 2024
1 parent dbf401f commit 78578f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/long-jobs-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'uhttp-exit-app': patch
---

Fix current relay nodes compatibility version
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 78578f8

Please sign in to comment.