Modification

This commit is contained in:
shunmugam 2020-01-08 13:57:22 +05:30
parent 59e328bf63
commit ec64f14b42

View File

@ -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);