1
0
Commit Graph

25 Commits

Author SHA1 Message Date
SomberNight
67c6f0e1bd wallet: make sure we don't create zero input txs
fixes #7207
2021-04-14 19:08:04 +02:00
Benoit Verret
f731c38293 Minor style changes 2021-03-21 00:36:23 -04:00
SomberNight
058d9ab6bb 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).
2021-02-25 15:32:07 +01:00
SomberNight
eefb68c82b transaction: change Transaction.is_segwit_input(txin) to txin.is_segwit() 2020-10-24 08:03:13 +02:00
SomberNight
154b9cab50 coinchooser: change "enable_output_value_rounding" default to True
see diff for rationale
2020-06-03 18:18:56 +02:00
SomberNight
5958fa8b2d coinchooser: small clean-up re enable_output_value_rounding 2020-06-03 18:14:05 +02:00
SomberNight
04d018cd0f test_lnpeer: some clean-up, make it easier to add "num_node>2" tests 2020-05-06 11:06:33 +02:00
SomberNight
5549f3adbe CoinChooser: avoid NotEnoughFunds if zero buckets are sufficient
closes #5752

Adapted from @JeremyRand's fix
2019-11-11 15:15:04 +01:00
SomberNight
bafe8a2fff integrate PSBT support natively. WIP 2019-11-04 22:24:36 +01:00
SomberNight
d9b5ab3086 wallet: fix bump_fee when there are only change outputs
closes #5718
closes #5603
2019-10-22 17:12:23 +02:00
SomberNight
94b721baa4 wallet: fix type error in _bump_fee_through_decreasing_outputs
fixes #5483
2019-07-04 17:23:34 +02:00
SomberNight
4f51308eab coinchooser: clarify docs for make_tx 2019-06-29 16:21:07 +02:00
SomberNight
fd5d1dab4f coinchooser: clear up what "fee_estimator" expects 2019-06-20 22:46:22 +02:00
SomberNight
cb69aa80f7 coinchooser: don't spend buckets with negative effective value
Calculate the effective value of buckets, and filter <0 out.
Note that the filtering is done on the buckets, not per-coin.
This should better preserve the user's privacy in certain cases.

When the user "sends Max", as before, all UTXOs are selected,
even if they are not economical to spend.

see #5433
2019-06-20 22:42:50 +02:00
SomberNight
e864fa5088 coinchooser: tweak heuristic scoring.
transactions without any change now get better scores.
transactions with really small change get worse scores.
2019-06-20 22:42:47 +02:00
SomberNight
f409b5da40 coinchooser: refactor so that penalty_func has access to change outputs 2019-06-20 22:42:47 +02:00
SomberNight
cb204dd969 coinchooser: better account for fees in penalty_func 2019-06-17 19:55:39 +02:00
SomberNight
3385a94753 logging: basics 2019-05-02 15:19:03 +02:00
SomberNight
d56917f4b1 coinchooser: improve performance significantly
existing code was n^2 in number of UTXOs
this is now mostly linear
(linear if shortcut is hit; otherwise in rare cases still quadratic)

tested using wallet with 800 UTXOs, most of which were needed to make payment
coinchooser.make_tx() went from 18 sec to 0.8 sec
2019-05-02 03:07:34 +02:00
SomberNight
71ac3bb305 RBF batching: some fixes 2018-11-09 17:56:42 +01:00
ThomasV
2b8d801b36 if possible, batch new transaction with existing rbf transaction 2018-11-09 16:33:29 +01:00
SomberNight
9037f25da1 kill old-style namedtuples 2018-10-28 00:28:29 +02:00
SomberNight
b7178f2d21 coinchooser: small clean-up (use TxOutput.value) 2018-08-14 21:50:59 +02:00
SomberNight
2eb72d496f transaction: introduce TxOutput namedtuple 2018-08-01 19:10:08 +02:00
Janus
097ac144d9 file reorganization with top-level module 2018-07-13 14:01:37 +02:00