1
0

Merge pull request #9634 from SomberNight/202503_is_frozen_futuretx

wallet: consider "future" coins as frozen by default
This commit is contained in:
ghost43
2025-03-14 14:26:07 +00:00
committed by GitHub
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

@@ -1972,6 +1972,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
addr = utxo.address