mirror of
https://github.com/tornadocash/tornado-relayer.git
synced 2025-07-15 11:09:42 -04:00
add try catch
This commit is contained in:
parent
89341b362e
commit
359ef927ab
1 changed files with 6 additions and 1 deletions
|
@ -64,7 +64,12 @@ class Fetcher {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async fetchNonce() {
|
async fetchNonce() {
|
||||||
|
try {
|
||||||
config.nonce = await this.web3.eth.getTransactionCount(this.web3.eth.defaultAccount)
|
config.nonce = await this.web3.eth.getTransactionCount(this.web3.eth.defaultAccount)
|
||||||
|
} catch(e) {
|
||||||
|
console.error('fetchNonce failed', e.message)
|
||||||
|
setTimeout(this.fetchNonce, 3000)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue