Skip to content

Commit 0eb7019

Browse files
Reduce memory consumption when computing circulation (#55)
1 parent 1f573e1 commit 0eb7019

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tokenomics_decentralization/helper.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,10 @@ def get_circulation_from_entries(entries):
290290
Computes the aggregate value of a list of db entries
291291
:returns: integer
292292
"""
293-
return sum([int(entry[1]) for entry in entries])
293+
circulation = 0
294+
for entry in entries:
295+
circulation += int(entry[1])
296+
return circulation
294297

295298

296299
def get_exclude_contracts_flag():

0 commit comments

Comments
 (0)