bug: change MinerData().total_chips from reduce to sum, as reduce was causing issues when instantiating MinerData with a hashboard list that is empty.

This commit is contained in:
UpstreamData
2022-11-07 09:37:22 -07:00
parent f5ec513ce0
commit 8388d2f4ac

View File

@@ -177,7 +177,7 @@ class MinerData:
@property
def total_chips(self): # noqa - Skip PyCharm inspection
return reduce(lambda x, y: x + y, [hb.chips for hb in self.hashboards])
return sum([hb.chips for hb in self.hashboards])
@total_chips.setter
def total_chips(self, val):