refresh button. locktim is correctly saved, minor bugfix in checking confirmed transaction

This commit is contained in:
2026-02-05 17:11:11 -04:00
parent 1836cdd892
commit d86b941fcb
3 changed files with 53 additions and 40 deletions

31
will.py
View File

@@ -394,8 +394,10 @@ class Will:
else:
if wallet.db.get_transaction(wi._id):
print("search rai status confirmed")
wi.set_status("CONFIRMED", True)
else:
print("search rai status invalidated")
wi.set_status("INVALIDATED", True)
for child in wi.search(all_inputs):
@@ -420,19 +422,24 @@ class Will:
# check if transactions are stil valid tecnically valid
def check_invalidated(willtree, utxos_list, wallet):
print("utxo list",utxos_list)
for wid, w in willtree.items():
if not w.father:
for inp in w.tx.inputs():
inp_str = Util.utxo_to_str(inp)
if not inp_str in utxos_list:
if wallet:
height = Will.check_tx_height(w.tx, wallet)
if height < 0:
Will.set_invalidate(wid, willtree)
elif height == 0:
w.set_status("PENDING", True)
else:
w.set_status("CONFIRMED", True)
print("check transaction",w._id)
#if not w.father:
for inp in w.tx.inputs():
inp_str = Util.utxo_to_str(inp)
if not inp_str in utxos_list:
if wallet:
height = Will.check_tx_height(w.tx, wallet)
if height < 0:
Will.set_invalidate(wid, willtree)
elif height == 0:
w.set_status("PENDING", True)
else:
print("check_invalidate status confirmed",w._id)
w.set_status("CONFIRMED", True)
#else:
# print("father",w.father)
def reflect_to_children(treeitem):
if not treeitem.get_status("VALID"):