ThomasV
e02687bcf2
python3 updates
2017-08-26 08:28:24 +02:00
ThomasV
d8e37644d3
python3 updates
2017-08-26 08:28:24 +02:00
Dmitry Sorokin
0693403358
sending fixed
2017-08-26 08:28:24 +02:00
Dmitry Sorokin
5be78950ca
py3
2017-08-26 08:27:47 +02:00
ThomasV
31cd9753aa
fix #2270 : height sorting can use negative value
2017-03-11 12:06:15 +01:00
ThomasV
43c037cc10
follow-up 0ae04a6419
2016-04-08 10:43:55 +02:00
ThomasV
0ae04a6419
fix #1703
2016-04-08 10:34:54 +02:00
ThomasV
bca0f31fca
coinchooser methods should not belong in wallet class
2016-03-10 16:37:45 +01:00
Justin Turner Arthur
46907e97c1
Remove penalty_func from CoinChooserPrivacy that is later implemented/redefined.
...
Probably a copy pasta from the development process.
2016-03-09 14:22:28 -06:00
ThomasV
305843999e
Relicensing
2016-02-24 10:20:30 +01:00
Neil Booth
97bc1b2788
Don't split small change
2016-01-23 22:10:25 +09:00
ThomasV
d200b236ae
replace tx.input, tx.output by methods, so that deserialize calls are encapsulated
2016-01-17 15:04:11 +01:00
Neil Booth
f1bb3e846d
Remove unused import
2016-01-16 19:03:06 +09:00
Neil Booth
15707b5590
Coin chooser: use deterministic randomness
2016-01-16 18:55:50 +09:00
ThomasV
eb085c2e23
Clarify preferences dialog:
...
* rename 'Oldest First' policy as Priority
* show multiple change and fee multiplier on separate lines
2016-01-15 09:02:03 +01:00
Neil Booth
6bf91b8ae2
Update comments and tooltips.
2016-01-15 15:25:01 +09:00
Neil Booth
53fa973898
Move change_amounts() to base class.
...
Update tooltip of the preference.
2016-01-15 15:21:25 +09:00
ThomasV
0d52911561
define constants for tx output types
2016-01-14 17:15:50 +01:00
Neil Booth
0a3d74de8f
Avoid index-out-of-range
...
Also add sanity assertion
2015-12-20 12:19:44 +09:00
Neil Booth
25a2ceda23
Fix copyright.
2015-12-20 12:06:23 +09:00
Neil Booth
5c3a6db445
Fix negative amounts assertion
...
Change amounts could be negative after deducting the cost of the extra
change output; floor them at zero. Move the assertion to the main
code. Simplify rounding logic.
2015-12-19 13:44:12 +09:00
Neil Booth
cead9cd7c6
Ensure zeroes is always non-empty.
2015-12-14 07:45:01 +09:00
Neil Booth
1c528af433
Description tweaks.
...
Mention loss of priority, and rename Classic to Oldest First.
2015-12-12 18:32:24 +09:00
Neil Booth
36aaad392d
Fix docstring display.
2015-12-12 18:11:07 +09:00
Neil Booth
2763b0feea
Improved change handling for Privacy chooser
...
Breaks up large change in such a way as to make it
unclear what the real send might be.
Fixes #1203
2015-12-12 11:53:17 +09:00
Neil Booth
ea49e8dc96
Remove unneeded buckets for Privacy coin chooser
...
Commonize the code with the classic chooser and simplify.
2015-12-12 10:12:46 +09:00
Neil Booth
75b3ecee49
Add coin chooser to try and minimize loss of privacy.
2015-12-09 22:20:23 +09:00
Neil Booth
e302dbc71c
Move debug output to end of function.
2015-11-29 18:10:17 +09:00
Neil Booth
9a6dcf7b1e
Use bucketing to choose coins
...
Bucketing is generalization of coin chooser logic that makes it easy
to implement other algorithms.
- Put core coin chooser functionality in base class.
- Specialize derived class to implement classic electrum algorithm of
oldest coins first. One bucket per output.
No intended change in behaviour.
Coin chooser now sorts the coins as it wants; remove redundant sorting
from get_spendable_coins().
2015-11-29 17:59:36 +09:00
Neil Booth
93bb09230c
Track tx size directly; calculate fees from that
...
This has several advantages. Fee calculation is now very fast,
as we don't need to keep reserializing the tx. Another is that
we can reason about the fees after adding a change output without
having to add it, recalculate the tx fee, and remove it again.
2015-11-29 15:40:11 +09:00
Neil Booth
a4dd5acc48
Prepare to calculate tx fee given a tx size
2015-11-29 12:41:54 +09:00
Neil Booth
530dc16ed2
Remove unused import
2015-11-28 22:14:24 +09:00
Neil Booth
8785b65a1f
Remove need for coin chooser to take a wallet
2015-11-28 22:12:20 +09:00
Neil Booth
a6ea9a0c71
Simplify interface to make_tx in coin chooser
...
Makes the coin chooser code simpler and easier to understand.
2015-11-28 22:08:00 +09:00
Neil Booth
90dee43998
Move estimated_fee to Transaction class
...
It's not a function of the wallet but of the transaction
so it more naturally belongs there.
2015-11-28 21:28:54 +09:00
Neil Booth
e9061ea371
Move coin choosing logic to own class
...
This contains no change in logic, but is preparation for cleanup
and possible alternative strategies.
2015-11-28 14:49:10 +09:00