From ec64f14b42d888ba55f9f05775bb1c17e6181f1f Mon Sep 17 00:00:00 2001 From: shunmugam Date: Wed, 8 Jan 2020 13:57:22 +0530 Subject: [PATCH] Modification --- server/utils/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/utils/common.ts b/server/utils/common.ts index 0a0b556..1f59e46 100644 --- a/server/utils/common.ts +++ b/server/utils/common.ts @@ -375,7 +375,7 @@ async function avgBlockTime(height) { const blockaveragetime = await getConnection(Global.network) .query( - 'SELECT coalesce(avg(bb.alter), 0) as alter, bb.timestamp FROM (SELECT EXTRACT(EPOCH FROM (timestamp - LAG(timestamp) OVER (ORDER BY timestamp))) AS alter FROM blockchain_block where height < 1145 AND height > 2154 ) as bb', + 'SELECT coalesce(avg(bb.alter), 0) as alter FROM (SELECT EXTRACT(EPOCH FROM (timestamp - LAG(timestamp) OVER (ORDER BY timestamp))) AS alter FROM blockchain_block where height < 1145 AND height > 2154 ) as bb', ) .catch(err_msg => { return(err_msg);