Skip to content
Snippets Groups Projects
Commit fc824f05 authored by Dan Notestein's avatar Dan Notestein
Browse files

Restore "load" function that periodically caches all account names in blockchain in all_accounts

parent c772c5c6
No related tags found
No related merge requests found
......@@ -64,7 +64,13 @@ class Mutes:
def load(self):
"""Reload all accounts from irredeemables endpoint and global lists."""
# TODO: Refactor/remove this method
self.all_accounts.clear()
sql = "select id, name from hive_accounts"
db = Db.instance()
sql_result = db.query_all(sql)
for row in sql_result:
self.all_accounts[row['id']] = row['name']
self.fetched = perf()
@classmethod
def all(cls):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment