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:
@@ -177,7 +177,7 @@ class MinerData:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def total_chips(self): # noqa - Skip PyCharm inspection
|
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
|
@total_chips.setter
|
||||||
def total_chips(self, val):
|
def total_chips(self, val):
|
||||||
|
|||||||
Reference in New Issue
Block a user