wallet.bump_fee: add new strategy: decrease payment amounts
- Rename bump_fee "methods" to "strategies". - Refactor strategies so that bump_fee can use any subset of them in any permutation. - Adds a new strategy which decreases the payment outputs (instead of change).
This commit is contained in:
@@ -238,7 +238,7 @@ class CoinChooserBase(Logger):
|
||||
assert is_address(change_addrs[0])
|
||||
|
||||
# This takes a count of change outputs and returns a tx fee
|
||||
output_weight = 4 * Transaction.estimated_output_size(change_addrs[0])
|
||||
output_weight = 4 * Transaction.estimated_output_size_for_address(change_addrs[0])
|
||||
fee_estimator_numchange = lambda count: fee_estimator_w(tx_weight + count * output_weight)
|
||||
change = self._change_outputs(tx, change_addrs, fee_estimator_numchange, dust_threshold)
|
||||
tx.add_outputs(change)
|
||||
|
||||
Reference in New Issue
Block a user