fetch gasPrice and rates for testnets for better testing during dev

This commit is contained in:
Alexey 2019-11-25 12:50:15 +03:00
parent db6a47f4fb
commit ab088a0855
2 changed files with 4 additions and 7 deletions

@ -2,7 +2,7 @@
"name": "relay",
"version": "1.0.0",
"description": "Relayer for Tornado mixer. https://tornado.cash",
"main": "index.js",
"main": "src/index.js",
"scripts": {
"start": "node src/index.js",
"eslint": "npx eslint --ignore-path .gitignore .",

@ -34,12 +34,9 @@ app.get('/status', function (req, res) {
app.post('/relay', relayController)
app.listen(port || 8000)
if (Number(netId) === 1) {
console.log('Gas price oracle started.')
fetcher.fetchGasPrice()
fetcher.fetchPrices()
}
console.log('Relayer started on port', port || 8000)
console.log(`relayerAddress: ${web3.eth.defaultAccount}`)