From 719dc103b785b7f845fc00c581d447cf18ec1b29 Mon Sep 17 00:00:00 2001 From: jsalyers Date: Thu, 2 Apr 2020 11:39:02 -0400 Subject: [PATCH] [JES] Testing if I can link against a gitlab version --- src/api/transports/http.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/api/transports/http.js b/src/api/transports/http.js index 4853daa..c236bd1 100644 --- a/src/api/transports/http.js +++ b/src/api/transports/http.js @@ -14,6 +14,19 @@ class RPCError extends Error { } } +let _errorCount = 0, _errorLimit = 4, _hasBeenInitialized = false, _apiNodeIndex = 0; +const suggestedApiNodes = ['https://api.hive.blog', 'https://anyx.io']; + +function notifyError() +{ + console.log("in notifyError()"); + _errorCount++; + if (_errorCount >= _errorLimit) + { + _errorCount = 0; + } +}; + /** * Makes a JSON-RPC request using `fetch` or a user-provided `fetchMethod`. * -- GitLab