Fixing small error with the previous commit
This commit is contained in:
parent
b4f65f0d72
commit
2187e097df
@ -721,7 +721,6 @@ async def getLatestTransactionDetails():
|
|||||||
async def getLatestBlockDetails():
|
async def getLatestBlockDetails():
|
||||||
|
|
||||||
limit = request.args.get('limit')
|
limit = request.args.get('limit')
|
||||||
int(limit)
|
|
||||||
|
|
||||||
dblocation = dbfolder + '/latestCache.db'
|
dblocation = dbfolder + '/latestCache.db'
|
||||||
if os.path.exists(dblocation):
|
if os.path.exists(dblocation):
|
||||||
@ -733,6 +732,7 @@ async def getLatestBlockDetails():
|
|||||||
if limit is None:
|
if limit is None:
|
||||||
c.execute('''SELECT * FROM ( SELECT * FROM latestBlocks ORDER BY blockNumber DESC LIMIT 4) ORDER BY id ASC;''')
|
c.execute('''SELECT * FROM ( SELECT * FROM latestBlocks ORDER BY blockNumber DESC LIMIT 4) ORDER BY id ASC;''')
|
||||||
else:
|
else:
|
||||||
|
int(limit)
|
||||||
c.execute('SELECT * FROM ( SELECT * FROM latestBlocks ORDER BY blockNumber DESC LIMIT {}) ORDER BY id ASC;'.format(limit))
|
c.execute('SELECT * FROM ( SELECT * FROM latestBlocks ORDER BY blockNumber DESC LIMIT {}) ORDER BY id ASC;'.format(limit))
|
||||||
latestBlocks = c.fetchall()
|
latestBlocks = c.fetchall()
|
||||||
c.close()
|
c.close()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user