From 36fd489383eae916cd7aa36fd16055f9536eedf9 Mon Sep 17 00:00:00 2001 From: osiris account Date: Sun, 12 Mar 2023 15:37:02 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + token-scanner-api/src/server/database.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 41b5ee0..eb82819 100644 --- a/README.md +++ b/README.md @@ -33,3 +33,4 @@
* **[go-outside-labs orchestration-toolkit](https://github.com/go-outside-labs/orchestration-toolkit)** +* **[google biquery article on blockchain public datasets](https://cloud.google.com/blog/products/data-analytics/introducing-six-new-cryptocurrencies-in-bigquery-public-datasets-and-how-to-analyze-them)** diff --git a/token-scanner-api/src/server/database.py b/token-scanner-api/src/server/database.py index f431414..e7af21a 100644 --- a/token-scanner-api/src/server/database.py +++ b/token-scanner-api/src/server/database.py @@ -44,7 +44,7 @@ async def retrieve_top_balances(top_number: int, env_vars: dict) -> list: """Retrieve top balances from the database.""" collection = _get_db_collection(env_vars) - top_balances = collection.find().sort({"balance": {"$lt": top_number}}, pymongo.DESCENDING) + top_balances = collection.find().sort({"balance"}, pymongo.DESCENDING).limit(top_number) result = [] counter = 0