Skip to content

Commit 5f6bf70

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
latest_transactions = queue.Queue(maxsize=100) # Keep last 100 transactions
2020

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

0 commit comments

Comments
 (0)