fix send_request version message

This commit is contained in:
2026-03-18 16:25:59 -04:00
parent a022c413cc
commit 9737221914
5 changed files with 47 additions and 35 deletions

33
qt.py
View File

@@ -1046,7 +1046,7 @@ class BalWindow(Logger):
self.waiting_dialog.exe()
def push_transactions_to_willexecutors(self, force=False):
willexecutors = Willexecutors.get_willexecutor_transactions(self.willitems)
willexecutors = Willexecutors.get_willexecutor_transactions(self.bal_plugin, self.willitems)
def getMsg(willexecutors):
msg = "Broadcasting Transactions to Will-Executors:\n"
@@ -1060,7 +1060,7 @@ class BalWindow(Logger):
self.waiting_dialog.update(getMsg(willexecutors))
if "txs" in willexecutor:
try:
if Willexecutors.push_transactions_to_willexecutor(
if Willexecutors.push_transactions_to_willexecutor(self.bal_plugin,
willexecutors[url]
):
for wid in willexecutors[url]["txsids"]:
@@ -1079,7 +1079,14 @@ class BalWindow(Logger):
self.willitems[wid].we["url"], wid, "Waiting"
)
)
self.willitems[wid].check_willexecutor()
w = self.willitems[wid]
w.set_check_willexecutor(
Willexecutors.check_transaction(
self.bal_plugin,
w._id,
w.we["url"]
)
)
self.waiting_dialog.update(
"checked {} - {} : {}".format(
self.willitems[wid].we["url"],
@@ -1128,7 +1135,8 @@ class BalWindow(Logger):
self.waiting_dialog.update(
"checking transaction: {}\n willexecutor: {}".format(wid, w.we["url"])
)
w.check_willexecutor()
w.set_check_willexecutor(Willexecutors.check_transaction(self.bal_plugin,w._id, w.we["url"]))
if time.time() - start < 3:
time.sleep(3 - (time.time() - start))
@@ -1176,7 +1184,7 @@ class BalWindow(Logger):
self.waiting_dialog.update(get_title())
except Exception:
pass
wes[url] = Willexecutors.get_info_task(url, we)
wes[url] = Willexecutors.get_info_task(self.bal_plugin, url, we)
if wes[url]["status"] == "KO":
failed.append(url)
else:
@@ -2048,6 +2056,7 @@ class BalBuildWillDialog(BalDialog):
self.parent = parent
self.updatemessage.connect(self.update)
self.bal_window = bal_window
self.bal_plugin = bal_window.bal_plugin
self.message_label = QLabel(_("Building Will:"))
self.vbox = QVBoxLayout(self)
self.vbox.addWidget(self.message_label)
@@ -2237,7 +2246,7 @@ class BalBuildWillDialog(BalDialog):
self.bal_window.willexecutors.get(url)
):
_logger.debug(f"{url}: {willexecutor}")
if not Willexecutors.push_transactions_to_willexecutor(
if not Willexecutors.push_transactions_to_willexecutor(self.bal_plugin,
willexecutor
):
for wid in willexecutor["txsids"]:
@@ -2257,7 +2266,9 @@ class BalBuildWillDialog(BalDialog):
self.bal_window.willitems[wid].we["url"], wid, "Waiting"
)
)
self.bal_window.willitems[wid].check_willexecutor()
self.bal_plugin = bal_window.bal_plugin
w = self.bal_window.willitems[wid]
w.set_check_willexecutor(Willexecutors.check_transaction(self.bal_plugin,w._id, w.we["url"]))
row = self.msg_edit_row(
"checked {} - {} : {}".format(
self.bal_window.willitems[wid].we["url"],
@@ -2509,6 +2520,7 @@ class HeirList(MyTreeView, MessageBoxMixin):
self.decimal_point = bal_window.window.get_decimal_point()
self.bal_window = bal_window
try:
self.setModel(QStandardItemModel(self))
self.sortByColumn(self.Columns.NAME, Qt.SortOrder.AscendingOrder)
@@ -2592,12 +2604,6 @@ class HeirList(MyTreeView, MessageBoxMixin):
menu.addAction(_("Delete"), lambda: self.delete_heirs(selected_keys))
menu.exec(self.viewport().mapToGlobal(position))
# def get_selected_keys(self):
# selected_keys = []
# for s_idx in self.selected_in_column(self.Columns.NAME):
# sel_key = self.model().itemFromIndex(s_idx).data(0)
# selected_keys.append(sel_key)
# return selected_keys
def update(self):
current_key = self.get_role_data_for_current_item(
col=self.Columns.NAME, role=self.ROLE_HEIR_KEY
@@ -2747,6 +2753,7 @@ class HeirList(MyTreeView, MessageBoxMixin):
self.heir_tx_fees.setValue(int(self.bal_window.will_settings["baltx_fees"]))
except Exception as e:
pass
_logger.debug(f"Exception update_will_settings {e}")
def build_transactions(self):