make_unsigned_transaction: call get_unconfirmed_base_tx_for_batching lazily
This commit is contained in:
@@ -1668,8 +1668,8 @@ class Abstract_Wallet(ABC, Logger, EventListener):
|
|||||||
# Let the coin chooser select the coins to spend
|
# Let the coin chooser select the coins to spend
|
||||||
coin_chooser = coinchooser.get_coin_chooser(self.config)
|
coin_chooser = coinchooser.get_coin_chooser(self.config)
|
||||||
# If there is an unconfirmed RBF tx, merge with it
|
# If there is an unconfirmed RBF tx, merge with it
|
||||||
base_tx = self.get_unconfirmed_base_tx_for_batching()
|
base_tx = self.get_unconfirmed_base_tx_for_batching() if self.config.get('batch_rbf', False) else None
|
||||||
if self.config.get('batch_rbf', False) and base_tx:
|
if base_tx:
|
||||||
# make sure we don't try to spend change from the tx-to-be-replaced:
|
# make sure we don't try to spend change from the tx-to-be-replaced:
|
||||||
coins = [c for c in coins if c.prevout.txid.hex() != base_tx.txid()]
|
coins = [c for c in coins if c.prevout.txid.hex() != base_tx.txid()]
|
||||||
is_local = self.adb.get_tx_height(base_tx.txid()).height == TX_HEIGHT_LOCAL
|
is_local = self.adb.get_tx_height(base_tx.txid()).height == TX_HEIGHT_LOCAL
|
||||||
|
|||||||
Reference in New Issue
Block a user