Compare commits
No commits in common. "eb4fd2536e89df31be0c77a4feef1676c4755bb7" and "84227a525ea3395ed79e18b72548242343ed3f5d" have entirely different histories.
eb4fd2536e
...
84227a525e
@ -515,7 +515,7 @@ def get_latest_txs(chain_spec, count=10, since=None, until=None, status=None, n
|
|||||||
if not_status != None:
|
if not_status != None:
|
||||||
q = q.filter(Otx.status.op('&')(not_status)==0)
|
q = q.filter(Otx.status.op('&')(not_status)==0)
|
||||||
|
|
||||||
q = q.order_by(Otx.date_created.desc(), Otx.nonce.desc()).limit(count)
|
q = q.order_by(Otx.nonce.asc(), Otx.date_created.asc()).limit(count)
|
||||||
results = q.all()
|
results = q.all()
|
||||||
for r in results:
|
for r in results:
|
||||||
if txs.get(r.tx_hash) != None:
|
if txs.get(r.tx_hash) != None:
|
||||||
|
|||||||
@ -373,6 +373,7 @@ class TestTxQuery(TestTxBase):
|
|||||||
|
|
||||||
nonce_hashes.append(tx_hash)
|
nonce_hashes.append(tx_hash)
|
||||||
|
|
||||||
|
time_between = datetime.datetime.utcnow()
|
||||||
|
|
||||||
tx_hash = add_0x(os.urandom(32).hex())
|
tx_hash = add_0x(os.urandom(32).hex())
|
||||||
signed_tx = add_0x(os.urandom(128).hex())
|
signed_tx = add_0x(os.urandom(128).hex())
|
||||||
@ -400,7 +401,7 @@ class TestTxQuery(TestTxBase):
|
|||||||
|
|
||||||
txs = get_latest_txs(self.chain_spec, session=self.session)
|
txs = get_latest_txs(self.chain_spec, session=self.session)
|
||||||
self.assertEqual(len(txs.keys()), 3)
|
self.assertEqual(len(txs.keys()), 3)
|
||||||
|
|
||||||
txs = get_latest_txs(self.chain_spec, count=1, session=self.session)
|
txs = get_latest_txs(self.chain_spec, count=1, session=self.session)
|
||||||
self.assertEqual(len(txs.keys()), 1)
|
self.assertEqual(len(txs.keys()), 1)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user