feat: disable loader rate limiter for non solana endpoints (#13018)

This commit is contained in:
Justin Starry
2020-10-21 16:19:51 +08:00
committed by GitHub
parent e4231d1028
commit 8863b773c1
4 changed files with 14 additions and 18 deletions

View File

@@ -1446,6 +1446,7 @@ export type ConfirmedSignatureInfo = {
* A connection to a fullnode JSON RPC endpoint
*/
export class Connection {
_rpcEndpoint: string;
_rpcRequest: RpcRequest;
_rpcWebSocket: RpcWebSocketClient;
_rpcWebSocketConnected: boolean = false;
@@ -1487,6 +1488,8 @@ export class Connection {
* @param commitment optional default commitment level
*/
constructor(endpoint: string, commitment: ?Commitment) {
this._rpcEndpoint = endpoint;
let url = urlParse(endpoint);
const useHttps = url.protocol === 'https:';