wallet: consider "future" coins as frozen by default
This commit is contained in:
@@ -465,6 +465,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener):
|
|||||||
def on_event_adb_set_future_tx(self, adb, txid):
|
def on_event_adb_set_future_tx(self, adb, txid):
|
||||||
if adb == self.wallet.adb:
|
if adb == self.wallet.adb:
|
||||||
self.history_model.refresh('set_future_tx')
|
self.history_model.refresh('set_future_tx')
|
||||||
|
self.utxo_list.refresh_all() # for coin frozen status
|
||||||
|
self.update_status() # frozen balance
|
||||||
|
|
||||||
@qt_event_listener
|
@qt_event_listener
|
||||||
def on_event_verified(self, *args):
|
def on_event_verified(self, *args):
|
||||||
|
|||||||
@@ -1966,6 +1966,9 @@ class Abstract_Wallet(ABC, Logger, EventListener):
|
|||||||
if frozen is not None: # user has explicitly set the state
|
if frozen is not None: # user has explicitly set the state
|
||||||
return bool(frozen)
|
return bool(frozen)
|
||||||
# State not set. We implicitly mark certain coins as 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):
|
if self._is_coin_small_and_unconfirmed(utxo):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user