fix: Changed mempool caching to use db.timestamp_now instead of time.time()

This commit is contained in:
blackcoffeexbt 2023-01-05 15:25:38 +00:00
parent 1546847c50
commit 637a468ec3

View File

@ -117,7 +117,7 @@ async def get_mempool_info(endPoint: str, gerty) -> dict:
mempool_id, mempool_id,
json.dumps(response.json()), json.dumps(response.json()),
endPoint, endPoint,
time.time(), db.timestamp_now,
gerty.mempool_endpoint, gerty.mempool_endpoint,
), ),
) )
@ -129,7 +129,7 @@ async def get_mempool_info(endPoint: str, gerty) -> dict:
"UPDATE gerty.mempool SET data = ?, time = ? WHERE endpoint = ? AND mempool_endpoint = ?", "UPDATE gerty.mempool SET data = ?, time = ? WHERE endpoint = ? AND mempool_endpoint = ?",
( (
json.dumps(response.json()), json.dumps(response.json()),
time.time(), db.timestamp_now,
endPoint, endPoint,
gerty.mempool_endpoint, gerty.mempool_endpoint,
), ),