minor cleanup

This commit is contained in:
poma 2020-10-01 07:01:02 +03:00
parent 4a4cfc5d48
commit 6b9acb8c6b
No known key found for this signature in database
GPG Key ID: BA20CB01FE165657
2 changed files with 4 additions and 7 deletions

@ -34,5 +34,5 @@ app.post('/relay', controller.tornadoWithdraw)
// app.post('/v1/miningWithdraw', controller.miningWithdraw)
worker.start()
app.listen(port || 8000)
console.log(`Relayer ${version} started on port ${port || 8000}`)
app.listen(port)
console.log(`Relayer ${version} started on port ${port}`)

@ -30,12 +30,9 @@ async function fetchTree() {
}
async function start() {
web3 = new Web3(rpcUrl, null, { transactionConfirmationBlocks: 1 })
const account = web3.eth.accounts.privateKeyToAccount('0x' + privateKey)
web3.eth.accounts.wallet.add('0x' + privateKey)
web3.eth.defaultAccount = account.address
updateConfig({ rewardAccount: account.address })
web3 = new Web3(rpcUrl)
txManager = new TxManager({ privateKey, rpcUrl })
updateConfig({ rewardAccount: txManager.address })
queue.process(process)
redisSubscribe.subscribe('treeUpdate', fetchTree)
await fetchTree()