Commit Graph

5920 Commits

Author SHA1 Message Date
Neil Booth e190024f73 Only pass a fixed fee if it was user-specified.
Otherwise we inadvertently fix the fee at the prior calculated one,
which isn't what we want
2015-11-29 23:14:40 +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
ThomasV 39af17bc23 load wallets in daemon 2015-11-28 15:37:51 +01:00
Neil Booth d97106f17d Don't keep dust change in any case 2015-11-28 22:27:01 +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
ThomasV 0c20e737a9 fix missing import 2015-11-28 00:22:06 +01:00
ThomasV 00f298d3b1 revert e9c101f 2015-11-27 15:39:31 +01:00
ThomasV 90a2a049f4 network fix: callbacks were not called 2015-11-27 11:30:14 +01:00
ThomasV e9c101f0c8 daemon: use daemon threads 2015-11-27 09:54:01 +01:00
ThomasV 9782734f4c plugins: trustedcoin fixes 2015-11-26 14:15:54 +01:00
ThomasV 042f8ef832 network: cache subscription responses 2015-11-26 11:26:01 +01:00
ThomasV 43df795b1f network: separate callbacks from unanswered_requests 2015-11-26 10:57:43 +01:00
ThomasV d8ca881457 remove unused setting 2015-11-25 19:09:32 +01:00
ThomasV ed2ab5e3c1 websockets: minor fix 2015-11-25 11:37:10 +01:00
ThomasV 1207ad3ba4 fix: websocket uses network object 2015-11-25 10:48:34 +01:00
ThomasV 2a29d1e5e7 fix syntax error 2015-11-25 10:35:14 +01:00
ThomasV 2934fd17be fix websockets 2015-11-25 10:32:46 +01:00
Neil Booth cf23127ac1 Preserve alphabetical ordering...
And 2 is the default anyway as for most western currencies.
2015-11-25 00:16:06 +09:00
ThomasV b5a210fac3 add missing module electrum_plugins 2015-11-24 12:28:47 +01:00
ThomasV 7d760898c7 add kivy apk script 2015-11-24 12:20:43 +01:00
ThomasV 19533dda15 load wallet in ElectrumWindow constructor 2015-11-24 12:10:43 +01:00
ThomasV f09d80459d fix #1564 2015-11-24 11:13:48 +01:00
ThomasV c6780cce84 add Bitso exchange rate 2015-11-24 10:35:25 +01:00
ThomasV 9ba75b80e2 increase version number 2015-11-24 09:43:21 +01:00
ThomasV ba2c737a21 finish separation between plugins and GUIs 2015-11-24 09:36:42 +01:00
ThomasV 2c0489c809 plugins: separate GUIs using child classes 2015-11-23 14:15:25 +01:00
ThomasV 175fdbcac6 Disentangle plugins and window management; use Qt signals 2015-11-23 09:05:34 +01:00
Kirill Fomichev 334b84c3c3 Add assertions to get_target 2015-11-19 22:03:12 +03:00
Kirill Fomichev e188929972 Fix proof of work assert in verify_chunk 2015-11-19 18:40:54 +03:00
ThomasV b727824eed fix #1554: use AF_INET instead of AF_UNIX, and write port number to lockfile 2015-11-19 12:42:11 +01:00
ThomasV 34c2010e63 tweak build-wine script 2015-11-19 11:47:58 +01:00
ThomasV 7641137ecc simplify get_daemon 2015-11-19 11:05:49 +01:00
Neil Booth 3211d752c7 Need to set p.wallet unfortunately
Fixes #1553
2015-11-19 08:31:01 +09:00
ThomasV 47e5bd653a add a color pair for qr code 2015-11-15 17:53:02 +01:00
ThomasV 88c238dda7 fix Settings dialog in text gui 2015-11-15 13:29:31 +01:00
Neil Booth 0dcaa13d31 Show the wallet path in -v output 2015-11-14 16:14:00 +09:00
Neil Booth e9384f15ed Plugins manage their own wallet tracking 2015-11-14 15:58:10 +09:00
Neil Booth 53f6fb9876 Add a GC debugger
Add commented-out GC debugging step
2015-11-14 10:47:44 +09:00
Neil Booth 50755d7db3 Use weakref for tabs in QShortCut lambdas
Unfortunately we have no way to directly destroy or remove the
lambdas embedded in the QShortcut objects, so this is the
only solution to avoid leaking references.  As the QShortcut
objects have the window as parent, they are destroyed with the
window so dangling refs to the destroyed window can't happen.

This and 91349d109e fix #1549.
2015-11-14 10:35:29 +09:00
Neil Booth 91349d109e Add explanatory comment. 2015-11-13 23:42:46 +09:00
Neil Booth ae4cfc9f0b Unregister network callbacks from QT gui
Rework the callback system in QT to make this easy, and avoid
leaking window references that prevent the window from being
GC-ed on close
2015-11-13 23:36:29 +09:00
ThomasV 0d4de870a5 prepare 2.5.4 release 2015-11-12 14:56:51 +01:00
ThomasV ae42576423 Merge branch 'master' of git://github.com/spesmilo/electrum 2015-11-12 14:32:19 +01:00