blacked
This commit is contained in:
16
will.py
16
will.py
@@ -161,6 +161,7 @@ class Will:
|
||||
|
||||
|
||||
"""
|
||||
|
||||
def check_anticipate(ow: "WillItem", nw: "WillItem"):
|
||||
anticipate = Util.anticipate_locktime(ow.tx.locktime, days=1)
|
||||
if int(nw.tx.locktime) >= int(anticipate):
|
||||
@@ -297,7 +298,6 @@ class Will:
|
||||
|
||||
Will.search_anticipate_rec(will, old_inputs)
|
||||
|
||||
|
||||
def update_will(old_will, new_will):
|
||||
all_old_inputs = Will.get_all_inputs(old_will, only_valid=True)
|
||||
all_inputs_min_locktime = Will.get_all_inputs_min_locktime(all_old_inputs)
|
||||
@@ -439,7 +439,11 @@ class Will:
|
||||
# check if transactions are stil valid tecnically valid
|
||||
def check_invalidated(willtree, utxos_list, wallet):
|
||||
for wid, w in willtree.items():
|
||||
if not w.father or willtree[w.father].get_status("CONFIRMED") or willtree[w.father].get_status("PENDING"):
|
||||
if (
|
||||
not w.father
|
||||
or willtree[w.father].get_status("CONFIRMED")
|
||||
or willtree[w.father].get_status("PENDING")
|
||||
):
|
||||
for inp in w.tx.inputs():
|
||||
inp_str = Util.utxo_to_str(inp)
|
||||
if not inp_str in utxos_list:
|
||||
@@ -671,11 +675,11 @@ class WillItem(Logger):
|
||||
}
|
||||
|
||||
def set_status(self, status, value=True):
|
||||
#_logger.trace(
|
||||
# _logger.trace(
|
||||
# "set status {} - {} {} -> {}".format(
|
||||
# self._id, status, self.STATUS[status][1], value
|
||||
# )
|
||||
#)
|
||||
# )
|
||||
if self.STATUS[status][1] == bool(value):
|
||||
return None
|
||||
|
||||
@@ -886,9 +890,5 @@ class FixedAmountException(AmountException):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def test_check_invalidated():
|
||||
Will.check_invalidated(will, utxos_list, wallet)
|
||||
|
||||
Reference in New Issue
Block a user