Log block timestamp

This commit is contained in:
Gerardo Nardelli 2019-12-03 14:27:25 -03:00
parent 5583ea8b6b
commit ab2c0ea120
2 changed files with 3 additions and 1 deletions

@ -45,6 +45,8 @@ function processTransfersBuilder(config) {
logger.info({ from, value }, `Processing transfer ${transfer.transactionHash}`)
const block = await web3Foreign.eth.getBlock(blockNumber)
logger.debug({ blockNumber, timestamp: block.timestamp }, `Block obtained`)
const tokenSwapAllowed = await foreignBridge.methods.isTokenSwapAllowed(block.timestamp).call()
if (!tokenSwapAllowed) {

@ -44,8 +44,8 @@ function swapTokensBuilder(config) {
return txToSend
}
logger.debug(`Getting block`)
const block = await web3Foreign.eth.getBlock(blockNumber)
logger.debug({ timestamp: block.timestamp }, `Block obtained`)
logger.debug(`Checking if SCD Emergency Shutdown has happened`)
const tokenSwapAllowed = await foreignBridge.methods.isTokenSwapAllowed(block.timestamp).call()