Commit graph

11441 commits

Author SHA1 Message Date
ThomasV
128285a050 http server: add ssl and bip70 signed requests 2019-09-05 10:57:50 +02:00
SomberNight
9d65120e59
commands: fix "close_wallet" 2019-09-04 20:16:47 +02:00
SomberNight
1bd9b3a66a
commands: fix "restore" cmd
Previously commands did not run on the asyncio thread but now they do.
"restore" was polling like "while 1: time.sleep()", blocking the event loop.

Now "restore" does not sync the wallet; which is actually cleaner
as previously this wallet would never get unloaded from the daemon (syncing forever).

This is also symmetric with the "create" cmd which also does not try to sync with the network.

However now it became difficult to write a script that restores a wallet and wants to wait
until it gets synced. Workaround for now is to poll with "list_wallets" whether it's synced.

We could create a new command that blocks until the loaded wallet gets synced.
2019-09-04 20:15:54 +02:00
SomberNight
de83ab6d4a
CLI: remove timeout for offline commands
e.g. when interacting with hw wallets (e.g. signmessage)
it does not make sense to time out

also, str(e) of some exceptions such as TimeoutError is ""...
2019-09-04 14:35:04 +02:00
SomberNight
b0902940b5
README: mention submodule init 2019-09-04 14:03:39 +02:00
SomberNight
99b83f7527
fix #5617 2019-09-04 13:53:38 +02:00
SomberNight
a42a773d19
storage: replace STO_EV_* ints with IntEnum 2019-09-04 13:31:49 +02:00
ThomasV
54776ca1d9 disable http server by default 2019-09-04 13:07:44 +02:00
ThomasV
deb97567fb Qt: fix request menu 2019-09-04 12:52:32 +02:00
ThomasV
0d1ffe5642 fix submodule 2019-09-04 12:39:02 +02:00
ThomasV
747ab7a0a2 Integrate http_server (previously in electrum-merchant)
Use submodule to fetch HTML and CSS files
2019-09-04 12:20:05 +02:00
ThomasV
bd57880799 do not raise exception when add_own_channel adds channel update from the cache 2019-09-04 08:01:08 +02:00
ThomasV
e286ed1c13 add_own_channel does not need to be async 2019-09-03 21:01:45 +02:00
SomberNight
9372eacc29
hw wallets: show DeviceUnpairableError nicely in qt gui
need to subclass UserFacingException for main_window.on_error
2019-09-03 19:19:58 +02:00
SomberNight
bb2c3475cc
qt main_window: fix receive_at, rm dead code 2019-09-03 18:56:09 +02:00
SomberNight
8cd8c6612d
hw wallets: fix "show address" functionality in qt receive tab 2019-09-03 18:37:48 +02:00
SomberNight
ff94240139
qt receive tab: fix on-chain pay.requests without amount 2019-09-03 18:33:49 +02:00
SomberNight
c3504cec94
follow-up a4b24df4bb 2019-09-03 17:53:11 +02:00
SomberNight
073a09f926
wallet/keystore: small inheritance clean-up 2019-09-03 16:24:05 +02:00
ThomasV
a4b24df4bb fix json error in listrequests 2019-09-03 14:51:07 +02:00
ThomasV
2801539087 fix create_menu error #5609 2019-09-03 14:50:34 +02:00
SomberNight
ab76a1fe5b
wallet.add_hw_info: also store "is_change" in output_info
as it seems every consumer wants to know this and has its own hacks to
figure it out
2019-09-03 14:34:10 +02:00
SomberNight
ac329797e0
wallet.add_hw_info: minor clean-up 2019-09-03 14:20:00 +02:00
SomberNight
fd70b806de
(trivial) wine build: rm keys in Dockerfile 2019-09-03 14:18:56 +02:00
SomberNight
3d7cb935ff
appimage: don't rm jsonschema-*.dist-info as pkg needs it 2019-09-02 19:21:53 +02:00
ThomasV
7f870f5e09 replace daemon 'start' subdommand with -d 2019-09-02 19:04:08 +02:00
ThomasV
241a37d12d
Merge pull request #5253 from AbdussamadA/update-utxo-list-label
Update utxo list when label is changed on history list
2019-09-02 18:38:45 +02:00
ThomasV
d5691129bb
Merge pull request #5604 from MrNaif2018/master
Fix for onchain_history summary building
2019-09-02 18:35:23 +02:00
SomberNight
74366f5cce
android build: persist gradle datadir
avoids re-downloading hundreds of MB of data on every run
2019-09-02 17:32:48 +02:00
SomberNight
dfa345defc
only build one android apk on Travis (take 3...)
follow-up 8404e07061
2019-09-02 17:03:29 +02:00
ThomasV
a50f935aec Restructure invoices and requests (WIP)
- Terminology: use 'invoices' for outgoing payments, 'requests' for incoming payments
 - At the GUI level, try to handle invoices in a generic way.
 - Display ongoing payments in send tab.
2019-09-02 15:35:44 +02:00
MrNaif2018
1dab0aa719
Fix for onchain_history summary building 2019-09-02 16:24:08 +03:00
SomberNight
3902d774f7
(trivial) travis: move flake8 tests to first stage 2019-09-01 20:18:09 +02:00
SomberNight
8404e07061
only build one android apk on Travis
follow-up 0333632eb0
2019-09-01 20:05:40 +02:00
SomberNight
0534f937ab
local jsonrpc: log exceptions daemon-side 2019-09-01 18:23:01 +02:00
SomberNight
eb5033dfc6
commands: add feerate param to payto/paytomany 2019-09-01 17:52:02 +02:00
SomberNight
0333632eb0
follow-up prev: only build one apk on Travis 2019-09-01 15:49:50 +02:00
SomberNight
54d468f457
android apk: build two apks. ARMv7 and ARMv8 2019-09-01 15:38:26 +02:00
SomberNight
75afd06ca3
android build: don't download Apache ANT on every build 2019-08-31 19:08:41 +02:00
SomberNight
98c8c2127c
android build: update kivy, p4a, buildozer
- also merge https://github.com/kivy/buildozer/pull/957 as prereq for
building multiple apks (one per arch)
- and custom buildozer commit to put target arch into apk name
2019-08-31 17:06:02 +02:00
ThomasV
b99a71d1b3 kivy: call register_callback only from main_window. Display CTN in channel details. 2019-08-31 10:13:20 +02:00
ThomasV
e79253b5e0 Syntax change: Require --offline to run commands without a daemon.
That makes the syntax less ambiguous. It also makes it possible to
implement a CLI that does not import all the electrum modules.
2019-08-31 09:24:00 +02:00
ThomasV
c67fb88e58 remove redundant 'stop' in regtest setUp (should run a bit faster) 2019-08-31 08:49:31 +02:00
ThomasV
0702338912 main script: rm init_daemon (dead code), call sys_exit in init_cmdline 2019-08-31 08:32:06 +02:00
SomberNight
936d1e0a24
pyinstaller binaries: include files needed by new jsonrpc libs
fixes #5599
2019-08-30 21:15:47 +02:00
SomberNight
956bd3baaf
lnpeer: make per-peer TaskGroup a field (as for interfaces), and use it
lnpeer (and interface) response-handling-code should not run in the
network main_taskgroup as the remote could force an exception
to be raised and that would kill the whole network instead of just the peer
2019-08-30 19:51:17 +02:00
SomberNight
9e57a59615
network: handle main_taskgroup dying better. passthrough CancelledError
Previously if a task running in the main_taskgroup raised,
main_taskgroup might have never finished as fx.run (another task running
in main_taskgroup) could not be cancelled (it was swallowing the CancelledError).

Need to be careful with catching all Exceptions or BaseExceptions,
as that might result in a coroutine not being cancellable.
Note that from python 3.8 onwards, CancelledError will inherit from BaseException
instead of Exception, so catching all Exceptions is somewhat less horrible
but this will only really matter if we raise the min py version to 3.8...

Really, all "except BaseException" lines are suspect and at least should be
considered for replacement with "except Exception".

-----

regarding fx.run not being cancellable before, and relevant lines, see:

6197cfbb3b/electrum/network.py (L1171)
0decdffce2/aiorpcx/curio.py (L242)
0decdffce2/aiorpcx/curio.py (L199)
0decdffce2/aiorpcx/curio.py (L208)
0decdffce2/aiorpcx/curio.py (L218)
0decdffce2/aiorpcx/curio.py (L221)
6197cfbb3b/electrum/daemon.py (L194)
6197cfbb3b/electrum/daemon.py (L203)
6197cfbb3b/electrum/exchange_rate.py (L507)
6197cfbb3b/electrum/exchange_rate.py (L79)
2019-08-30 19:46:25 +02:00
ThomasV
6197cfbb3b Revert "Remove early return in create_sweeptxs_for_our_ctx."
This reverts commit d0cfb3ae12.
2019-08-30 17:40:46 +02:00
ThomasV
3e8080b669 test_breach_with_spent_htlc: do not overwrite default_wallet, load toxic_wallet instead 2019-08-30 17:40:09 +02:00
ThomasV
10e186c1d3 revert ed086934e5
(this does not work well with travis)
2019-08-30 15:58:38 +02:00