From a15e383dbbbc1f85780686e2c61afd775603c110 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Thu, 3 Nov 2022 12:30:37 +0000 Subject: [PATCH] wallet.add_input_info: also add block_height if known The coin_chooser requires the block_height field (to prioritise confirmed utxos). --- electrum/wallet.py | 1 + 1 file changed, 1 insertion(+) diff --git a/electrum/wallet.py b/electrum/wallet.py index aff05fd9d..3c00968ed 100644 --- a/electrum/wallet.py +++ b/electrum/wallet.py @@ -2187,6 +2187,7 @@ class Abstract_Wallet(ABC, Logger, EventListener): except UnknownTxinType: pass self._add_input_sig_info(txin, address, only_der_suffix=only_der_suffix) + txin.block_height = self.adb.get_tx_height(txin.prevout.txid.hex()).height def can_sign(self, tx: Transaction) -> bool: if not isinstance(tx, PartialTransaction):