diff --git a/config/mainnet.json b/config/mainnet.json index eb96791c..27bd3b5b 100644 --- a/config/mainnet.json +++ b/config/mainnet.json @@ -1,6 +1,6 @@ { "logs": { - "level": "warn" + "level": "info" }, "blockchain": { "rpc": "https://rpc.tomochain.com", diff --git a/config/mainnet_crawler.json b/config/mainnet_crawler.json index 3a49ffcb..e8588661 100644 --- a/config/mainnet_crawler.json +++ b/config/mainnet_crawler.json @@ -1,6 +1,6 @@ { "logs": { - "level": "warn" + "level": "info" }, "blockchain": { "rpc": "http://blockchain-proxy:8545", diff --git a/crawl.js b/crawl.js index 7f2d429e..1915315c 100644 --- a/crawl.js +++ b/crawl.js @@ -250,17 +250,21 @@ async function updateSigners () { let sleep = (time) => new Promise((resolve) => setTimeout(resolve, time)) async function watchNewBlock () { + let b = true while (true) { try { - logger.info('Update signers after sleeping 5 seconds') - await updateSigners() - await updatePenalties() + logger.info('Update signers after sleeping 3 seconds') + if (b) { + await updateSigners() + await updatePenalties() + } await updateLatestSignedBlock() await watchValidator() + b = !b } catch (e) { logger.error('watchNewBlock %s', e) } - await sleep(5000) + await sleep(3000) } }