Correct formatting in expiredblocks
This commit is contained in:
parent
0938bf0692
commit
ce0e60c4ea
@ -23,14 +23,15 @@ from etc import onionrvalues
|
|||||||
|
|
||||||
|
|
||||||
def get_expired_blocks():
|
def get_expired_blocks():
|
||||||
"""Return a list of expired blocks"""
|
"""Return a list of expired blocks."""
|
||||||
conn = sqlite3.connect(
|
conn = sqlite3.connect(
|
||||||
dbfiles.block_meta_db, timeout=onionrvalues.DATABASE_LOCK_TIMEOUT)
|
dbfiles.block_meta_db, timeout=onionrvalues.DATABASE_LOCK_TIMEOUT)
|
||||||
c = conn.cursor()
|
c = conn.cursor()
|
||||||
date = int(epoch.get_epoch())
|
date = int(epoch.get_epoch())
|
||||||
|
|
||||||
compiled = (date,)
|
compiled = (date,)
|
||||||
execute = 'SELECT hash FROM hashes WHERE expire <= ? ORDER BY dateReceived;'
|
execute = 'SELECT hash FROM hashes WHERE ' + \
|
||||||
|
'expire <= ? ORDER BY dateReceived;'
|
||||||
|
|
||||||
rows = list()
|
rows = list()
|
||||||
for row in c.execute(execute, compiled):
|
for row in c.execute(execute, compiled):
|
||||||
|
Loading…
Reference in New Issue
Block a user