fix tooltip fee estimate

This commit is contained in:
ThomasV 2017-03-06 09:00:56 +01:00
parent c75e074b88
commit cb709d8f57

View file

@ -212,7 +212,8 @@ class SimpleConfig(PrintError):
def reverse_dynfee(self, fee_per_kb): def reverse_dynfee(self, fee_per_kb):
import operator import operator
dist = map(lambda x: (x[0], abs(x[1] - fee_per_kb)), self.fee_estimates.items()) l = self.fee_estimates.items() + [(1, self.dynfee(4))]
dist = map(lambda x: (x[0], abs(x[1] - fee_per_kb)), l)
min_target, min_value = min(dist, key=operator.itemgetter(1)) min_target, min_value = min(dist, key=operator.itemgetter(1))
if fee_per_kb < self.fee_estimates.get(25)/2: if fee_per_kb < self.fee_estimates.get(25)/2:
min_target = -1 min_target = -1