skip willexecutor with dust amount
This commit is contained in:
21
heirs.py
21
heirs.py
@@ -435,15 +435,16 @@ class Heirs(dict, Logger):
|
||||
if int(Util.int_locktime(locktime)) > int(from_locktime):
|
||||
try:
|
||||
base_fee = int(willexecutor["base_fee"])
|
||||
willexecutors_amount += base_fee
|
||||
h = [None] * 4
|
||||
h[HEIR_AMOUNT] = base_fee
|
||||
h[HEIR_REAL_AMOUNT] = base_fee
|
||||
h[HEIR_LOCKTIME] = locktime
|
||||
h[HEIR_ADDRESS] = willexecutor["address"]
|
||||
willexecutors[
|
||||
'w!ll3x3c"' + willexecutor["url"] + '"' + str(locktime)
|
||||
] = h
|
||||
if base_fee > dust_threshold:
|
||||
willexecutors_amount += base_fee
|
||||
h = [None] * 4
|
||||
h[HEIR_AMOUNT] = base_fee
|
||||
h[HEIR_REAL_AMOUNT] = base_fee
|
||||
h[HEIR_LOCKTIME] = locktime
|
||||
h[HEIR_ADDRESS] = willexecutor["address"]
|
||||
willexecutors[
|
||||
'w!ll3x3c"' + willexecutor["url"] + '"' + str(locktime)
|
||||
] = h
|
||||
except Exception:
|
||||
return [], False
|
||||
else:
|
||||
@@ -537,7 +538,7 @@ class Heirs(dict, Logger):
|
||||
break
|
||||
elif 0 <= j:
|
||||
url, willexecutor = willexecutorsitems[j]
|
||||
if not Willexecutors.is_selected(willexecutor):
|
||||
if not Willexecutors.is_selected(willexecutor) or willexecutor["base_fee"] < wallet.dust_threshold():
|
||||
continue
|
||||
else:
|
||||
willexecutor["url"] = url
|
||||
|
||||
Reference in New Issue
Block a user