close task invalidate tx
This commit is contained in:
21
will.py
21
will.py
@@ -338,7 +338,6 @@ class Will:
|
||||
if utxo_str in prevout_to_spend:
|
||||
balance += inputs[utxo_str][0][2].value_sats()
|
||||
utxo_to_spend.append(utxo)
|
||||
|
||||
if len(utxo_to_spend) > 0:
|
||||
change_addresses = wallet.get_change_addresses_for_new_transaction()
|
||||
out = PartialTxOutput.from_address_and_value(change_addresses[0], balance)
|
||||
@@ -428,7 +427,6 @@ class Will:
|
||||
if not inp_str in utxos_list:
|
||||
if wallet:
|
||||
height = Will.check_tx_height(w.tx, wallet)
|
||||
print(type(height))
|
||||
if height < 0:
|
||||
Will.set_invalidate(wid, willtree)
|
||||
elif height == 0:
|
||||
@@ -473,23 +471,16 @@ class Will:
|
||||
)
|
||||
|
||||
def check_will(will, all_utxos, wallet, block_to_check, timestamp_to_check):
|
||||
print("check will2")
|
||||
Will.add_willtree(will)
|
||||
print("willtree")
|
||||
utxos_list = Will.utxos_strs(all_utxos)
|
||||
print("utxo_list")
|
||||
|
||||
Will.check_invalidated(will, utxos_list, wallet)
|
||||
print("check invalidate")
|
||||
|
||||
all_inputs = Will.get_all_inputs(will, only_valid=True)
|
||||
print("get all inputs")
|
||||
all_inputs_min_locktime = Will.get_all_inputs_min_locktime(all_inputs)
|
||||
print("min_locktime")
|
||||
Will.check_will_expired(
|
||||
all_inputs_min_locktime, block_to_check, timestamp_to_check
|
||||
)
|
||||
print("check expired")
|
||||
|
||||
all_inputs = Will.get_all_inputs(will, only_valid=True)
|
||||
|
||||
@@ -507,9 +498,7 @@ class Will:
|
||||
wallet=False,
|
||||
callback_not_valid_tx=None,
|
||||
):
|
||||
print("is_will_valid")
|
||||
Will.check_will(will, all_utxos, wallet, block_to_check, timestamp_to_check)
|
||||
print("check will")
|
||||
if heirs:
|
||||
if not Will.check_willexecutors_and_heirs(
|
||||
will,
|
||||
@@ -665,11 +654,11 @@ class WillItem(Logger):
|
||||
}
|
||||
|
||||
def set_status(self, status, value=True):
|
||||
_logger.debug(
|
||||
"set status {} - {} {} -> {}".format(
|
||||
self._id, status, self.STATUS[status][1], value
|
||||
)
|
||||
)
|
||||
#_logger.trace(
|
||||
# "set status {} - {} {} -> {}".format(
|
||||
# self._id, status, self.STATUS[status][1], value
|
||||
# )
|
||||
#)
|
||||
if self.STATUS[status][1] == bool(value):
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user