Skip to content

Commit

Permalink
Practical updates to miner
Browse files Browse the repository at this point in the history
  • Loading branch information
area authored and kronosapiens committed Jan 31, 2022
1 parent 4662efb commit 42decd1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/reputation-miner/bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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});
}
}

Expand Down

0 comments on commit 42decd1

Please sign in to comment.