Skip to content

Commit 12730ba

Browse files
committed
Practical updates to miner
1 parent a674ab9 commit 12730ba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/reputation-miner/bin/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class RetryProvider extends ethers.providers.StaticJsonRpcProvider {
4242
}
4343

4444
static attemptCheck(err, attemptNumber){
45+
console.log("Retrying RPC request #", attemptNumber);
4546
if (attemptNumber === 10){
4647
return false;
4748
}
@@ -56,7 +57,7 @@ class RetryProvider extends ethers.providers.StaticJsonRpcProvider {
5657
// method is the method name (e.g. getBalance) and params is an
5758
// object with normalized values passed in, depending on the method
5859
perform(method, params) {
59-
return backoff(() => super.perform(method, params), {retry: RetryProvider.attemptCheck});
60+
return backoff(() => super.perform(method, params), {retry: RetryProvider.attemptCheck, startingDelay: 1000});
6061
}
6162
}
6263

0 commit comments

Comments
 (0)