Skip to content

Commit fc83a49

Browse files
authored
Update routes.py
1 parent 5f6bf70 commit fc83a49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/routes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
from app.utils.exports import export_to_json, export_to_csv, format_transaction_data, format_address_data
1717

1818
# Initialize transaction queue
19-
latest_transactions = queue.Queue(maxsize=100) # Keep last 100 transactions
19+
latest_transactions = queue.Queue(maxsize=20) # Keep last 20 transactions
2020

2121
def handle_new_transaction(tx):
22-
if len(latest_transactions) >= 30:
22+
if latest_transactions.full():
2323
latest_transactions.get() # Remove oldest transaction if queue is full
2424
latest_transactions.put(tx)
2525

0 commit comments

Comments
 (0)