diff --git a/src/api/transports/http.js b/src/api/transports/http.js index 4853daa91133e1fc616214d548934e6ba497d57d..c236bd1f39064d8e8fe3feec3517b5a0a209487d 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`. *