1
0

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:
SomberNight
2021-02-15 10:03:08 +01:00
parent 8fe7d750f7
commit 058d9ab6bb
5 changed files with 222 additions and 26 deletions

View File

@@ -126,7 +126,7 @@ class TestTransaction(ElectrumTestCase):
self.assertEqual(tx.estimated_size(), 193)
def test_estimated_output_size(self):
estimated_output_size = transaction.Transaction.estimated_output_size
estimated_output_size = transaction.Transaction.estimated_output_size_for_address
self.assertEqual(estimated_output_size('14gcRovpkCoGkCNBivQBvw7eso7eiNAbxG'), 34)
self.assertEqual(estimated_output_size('35ZqQJcBQMZ1rsv8aSuJ2wkC7ohUCQMJbT'), 32)
self.assertEqual(estimated_output_size('bc1q3g5tmkmlvxryhh843v4dz026avatc0zzr6h3af'), 31)