forked from LBRYCommunity/lbry-sdk
frontload bug
divide availability adjusted price by frontload factor, which will be close to 1 while index is low and close to 2 when index is high - the reduction approaches 50% as index goes up.
This commit is contained in:
parent
5c391f4bb4
commit
c130879ef7
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ class MeanAvailabilityWeightedPrice(object):
|
||||||
mean_availability = self.blob_tracker.last_mean_availability
|
mean_availability = self.blob_tracker.last_mean_availability
|
||||||
availability = self.blob_tracker.availability.get(blob, [])
|
availability = self.blob_tracker.availability.get(blob, [])
|
||||||
index = 0 # blob.index
|
index = 0 # blob.index
|
||||||
price = self.base_price * (mean_availability / max(1, len(availability))) * self._frontload(index)
|
price = self.base_price * (mean_availability / max(1, len(availability))) / self._frontload(index)
|
||||||
return round(max(self.min_price, price), 5)
|
return round(max(self.min_price, price), 5)
|
||||||
|
|
||||||
def _frontload(self, index):
|
def _frontload(self, index):
|
||||||
|
|
Loading…
Reference in a new issue