1
0

wallet: consider "future" coins as frozen by default

This commit is contained in:
SomberNight
2025-03-13 17:02:08 +00:00
parent 3ff794da12
commit eea1eb5eb0
2 changed files with 5 additions and 0 deletions

View File

@@ -465,6 +465,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener):
def on_event_adb_set_future_tx(self, adb, txid):
if adb == self.wallet.adb:
self.history_model.refresh('set_future_tx')
self.utxo_list.refresh_all() # for coin frozen status
self.update_status() # frozen balance
@qt_event_listener
def on_event_verified(self, *args):

View File

@@ -1966,6 +1966,9 @@ class Abstract_Wallet(ABC, Logger, EventListener):
if frozen is not None: # user has explicitly set the state
return bool(frozen)
# State not set. We implicitly mark certain coins as frozen:
tx_mined_status = self.adb.get_tx_height(utxo.prevout.txid.hex())
if tx_mined_status.height == TX_HEIGHT_FUTURE:
return True
if self._is_coin_small_and_unconfirmed(utxo):
return True
return False