qt confirm_tx_dialog: fix wallet.get_candidates_for_batching
I don't understand what the "coins not used" comment meant here.
It was added in the change away from the old config.WALLET_BATCH_RBF option
(ab14c3e138).
The `coins` param *is used* in wallet.get_candidates_for_batching.
Without setting that, the returned set of candidates was restricted to
only base txs that had a large enough change output to cover *all* the newly added outputs.
Instead, it is desirable to allow adding new inputs.
This commit is contained in:
@@ -2162,7 +2162,7 @@ class TestWalletSending(ElectrumTestCase):
|
||||
coins = wallet.get_spendable_coins(domain=None)
|
||||
self.assertEqual(2, len(coins))
|
||||
|
||||
candidates = wallet.get_candidates_for_batching(outputs, coins)
|
||||
candidates = wallet.get_candidates_for_batching(outputs, coins=coins)
|
||||
self.assertEqual(candidates, [])
|
||||
with self.assertRaises(NotEnoughFunds):
|
||||
wallet.make_unsigned_transaction(coins=coins, outputs=outputs, fee_policy=FixedFeePolicy(1000), base_tx=toself_tx)
|
||||
|
||||
Reference in New Issue
Block a user