From 42decd14042c11657f54fcab1c1780596fd5ffe3 Mon Sep 17 00:00:00 2001 From: Alex Rea Date: Wed, 26 Jan 2022 14:49:43 +0000 Subject: [PATCH] Practical updates to miner --- packages/reputation-miner/bin/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/reputation-miner/bin/index.js b/packages/reputation-miner/bin/index.js index c3458188fc..17916dab71 100644 --- a/packages/reputation-miner/bin/index.js +++ b/packages/reputation-miner/bin/index.js @@ -42,6 +42,7 @@ class RetryProvider extends ethers.providers.StaticJsonRpcProvider { } static attemptCheck(err, attemptNumber){ + console.log("Retrying RPC request #", attemptNumber); if (attemptNumber === 10){ return false; } @@ -56,7 +57,7 @@ class RetryProvider extends ethers.providers.StaticJsonRpcProvider { // method is the method name (e.g. getBalance) and params is an // object with normalized values passed in, depending on the method perform(method, params) { - return backoff(() => super.perform(method, params), {retry: RetryProvider.attemptCheck}); + return backoff(() => super.perform(method, params), {retry: RetryProvider.attemptCheck, startingDelay: 1000}); } }