clear errors on start

This commit is contained in:
smart_ex 2022-04-12 16:31:43 +10:00 committed by Danil Kovtonyuk
parent e5dd4b465f
commit 526f1889f9
2 changed files with 6 additions and 1 deletions

@ -84,10 +84,14 @@ const readRelayerErrors = async redis => {
return errors
}
const clearRelayerErrors = redis => {
redis.del('errors')
}
module.exports = {
getInstance,
setSafeInterval,
fromDecimals,
logRelayerError,
readRelayerErrors,
clearRelayerErrors,
}

@ -4,7 +4,7 @@ const { toBN, toWei, fromWei, toHex } = require('web3-utils')
const { redis } = require('./modules/redis')
const proxyLightABI = require('../abis/proxyLightABI.json')
const { queue } = require('./queue')
const { getInstance, fromDecimals, logRelayerError } = require('./utils')
const { getInstance, fromDecimals, logRelayerError, clearRelayerErrors } = require('./utils')
const { jobType, status } = require('./constants')
const {
netId,
@ -27,6 +27,7 @@ let gasPriceOracle
function start() {
try {
web3 = new Web3(httpRpcUrl)
clearRelayerErrors(redis)
const { CONFIRMATIONS, MAX_GAS_PRICE } = process.env
const gasPriceOracleConfig = {
chainId: netId,