RetrieveHouseBalance: Don't hit redis for data we already have

This commit is contained in:
moneromooo 2015-01-25 12:26:15 +00:00
parent 32ab6a3127
commit 08bfb84183

View file

@ -250,14 +250,14 @@ def RetrieveHouseBalance():
user_balances=0
identities = redis_hgetall("balances")
for identity in identities:
ib = long(redis_hget("balances", identity))
ib = long(identities[identity])
house_balance = house_balance - ib
user_balances+=ib
earmarked_balances=0
earmarked = redis_hgetall("earmarked")
for e in earmarked:
eb = long(redis_hget("earmarked", e))
eb = long(earmarked[e])
house_balance = house_balance - eb
earmarked_balances+=eb