From ab2c0ea120fa1efe6af213ce9400b7cb0a291bee Mon Sep 17 00:00:00 2001 From: Gerardo Nardelli Date: Tue, 3 Dec 2019 14:27:25 -0300 Subject: [PATCH] Log block timestamp --- oracle/src/events/processHalfDuplexTransfers/index.js | 2 ++ oracle/src/workers/swapTokens.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/oracle/src/events/processHalfDuplexTransfers/index.js b/oracle/src/events/processHalfDuplexTransfers/index.js index fafc0b6b..0bd9b881 100644 --- a/oracle/src/events/processHalfDuplexTransfers/index.js +++ b/oracle/src/events/processHalfDuplexTransfers/index.js @@ -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) { diff --git a/oracle/src/workers/swapTokens.js b/oracle/src/workers/swapTokens.js index a6f55c0a..0956a037 100644 --- a/oracle/src/workers/swapTokens.js +++ b/oracle/src/workers/swapTokens.js @@ -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()