Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
myrho committed Feb 22, 2024
1 parent 4111046 commit 6de5353
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions gsrest/db/cassandra.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ def merge_address_txs_subquery_results(
# filtered out rows could be overlapping with yet not retrieved result sets
candidates = [
v for results in result_sets for v in results
if merge_all
or ascending and v[tx_id_keys] <= border_tx_id
if merge_all or ascending and v[tx_id_keys] <= border_tx_id
or not ascending and v[tx_id_keys] >= border_tx_id
]

Expand Down Expand Up @@ -1831,7 +1830,8 @@ async def add_balance_eth(self, currency, row):
"and currency=%s"

results = {
c: one(await self.execute_async(
c:
one(await self.execute_async(
currency, 'transformed', query,
[row['address_id'], row['address_id_group'], c]))
for c in balance_currencies
Expand Down Expand Up @@ -2094,9 +2094,10 @@ async def list_address_txs_ordered(self,

# collect and merge results
more_results, page = merge_address_txs_subquery_results(
[r.current_rows
for r in await asyncio.gather(*aws)], ascending, fs_it,
'transaction_id' if is_eth_like(network) else 'tx_id')
[r.current_rows for r in await asyncio.gather(*aws)],
ascending,
fs_it,
'transaction_id' if is_eth_like(network) else 'tx_id',
merge_all=tx_ids is not None)

results.extend(more_results)
Expand Down

0 comments on commit 6de5353

Please sign in to comment.