Skip to content
Merged
Prev Previous commit
Next Next commit
clearing list fix
  • Loading branch information
otselnik committed May 16, 2022
commit 000333be25c0db386655fb13fb36537ce3ee86aa
6 changes: 2 additions & 4 deletions proxy/indexer/indexer_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def process_functions(self):
self.gather_unknown_transactions()

def get_tx_receipts(self, stop_slot=None):
self.debug(f'get_tx_receipts')
signatures = self.gather_unknown_transactions()
self.debug(f'{len(signatures)}')

poll_txs = []
tx_list = []
Expand All @@ -102,6 +102,7 @@ def get_tx_receipts(self, stop_slot=None):
tx_list.append(signature)
if len(tx_list) >= 20:
poll_txs.append(tx_list)
tx_list = []
if len(tx_list) > 0:
poll_txs.append(tx_list)
self._get_txs(poll_txs)
Expand Down Expand Up @@ -130,7 +131,6 @@ def gather_unknown_transactions(self):
while continue_flag:
results = self._get_signatures(minimal_tx, self._maximum_tx, INDEXER_POLL_COUNT)
len_results = len(results)
self.debug(f'{len_results}')
if len_results == 0:
break

Expand Down Expand Up @@ -175,7 +175,6 @@ def _get_signatures(self, before: Optional[str], until: Optional[str], limit: in
return result

def _get_txs(self, poll_txs: List[List[str]]) -> None:
self.debug(f'{len(poll_txs)}')
if len(poll_txs) > 1:
pool = ThreadPool(min(PARALLEL_REQUESTS, len(poll_txs)))
pool.map(self._get_tx_receipts, poll_txs)
Expand All @@ -185,7 +184,6 @@ def _get_txs(self, poll_txs: List[List[str]]) -> None:
self._get_tx_receipts(poll_txs[0])

def _get_tx_receipts(self, sign_list: List[str]) -> None:
self.debug(f'{len(sign_list)}')
if len(sign_list) == 0:
return

Expand Down