fix(get_latest_txs): use desc ordering and switch order

This commit is contained in:
2022-02-28 15:33:55 +03:00
parent 84227a525e
commit 3d1d0d6dd2
3 changed files with 2 additions and 3 deletions

View File

@@ -515,7 +515,7 @@ def get_latest_txs(chain_spec, count=10, since=None, until=None, status=None, n
if not_status != None:
q = q.filter(Otx.status.op('&')(not_status)==0)
q = q.order_by(Otx.nonce.asc(), Otx.date_created.asc()).limit(count)
q = q.order_by(Otx.date_created.desc(), Otx.nonce.desc()).limit(count)
results = q.all()
for r in results:
if txs.get(r.tx_hash) != None: