restart after error

This commit is contained in:
Eric Pelland 2022-10-22 08:06:54 -04:00
parent 136aef6465
commit 4f2da73f00
1 changed files with 3 additions and 1 deletions

View File

@ -51,10 +51,12 @@ function search(accounts) {
}
}
main(count, balancesFound)
}).catch(emailError, true)
}).catch((err)=> { emailError(err, true) })
}
function emailError(err, restart = false){
console.log(err)
console.log(restart)
transporter.sendMail({
from: '"Random Ethereum Scanner" <foo@example.com>',
to: process.env.EMAIL_TO, // Test email address