Commit Graph

11417 Commits

Author SHA1 Message Date
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:

https://github.com/spesmilo/electrum/blob/6197cfbb3b00f21fb01fd8ef95a849eb63fc9253/electrum/network.py#L1171
https://github.com/kyuupichan/aiorpcX/blob/0decdffce20aec217e9b4506ea20a0919994cea0/aiorpcx/curio.py#L242
https://github.com/kyuupichan/aiorpcX/blob/0decdffce20aec217e9b4506ea20a0919994cea0/aiorpcx/curio.py#L199
https://github.com/kyuupichan/aiorpcX/blob/0decdffce20aec217e9b4506ea20a0919994cea0/aiorpcx/curio.py#L208
https://github.com/kyuupichan/aiorpcX/blob/0decdffce20aec217e9b4506ea20a0919994cea0/aiorpcx/curio.py#L218
https://github.com/kyuupichan/aiorpcX/blob/0decdffce20aec217e9b4506ea20a0919994cea0/aiorpcx/curio.py#L221
https://github.com/spesmilo/electrum/blob/6197cfbb3b00f21fb01fd8ef95a849eb63fc9253/electrum/daemon.py#L194
https://github.com/spesmilo/electrum/blob/6197cfbb3b00f21fb01fd8ef95a849eb63fc9253/electrum/daemon.py#L203
https://github.com/spesmilo/electrum/blob/6197cfbb3b00f21fb01fd8ef95a849eb63fc9253/electrum/exchange_rate.py#L507
https://github.com/spesmilo/electrum/blob/6197cfbb3b00f21fb01fd8ef95a849eb63fc9253/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
ThomasV 6f333bd86d make regtests more robust 2019-08-30 15:18:04 +02:00
ThomasV ed086934e5 In 'daemon start', do not return until the daemon can be reached 2019-08-30 15:15:30 +02:00
ThomasV 5ec1db4d51 Ignore exceptions raised in lnworker.on_network_update.
Exception raised there may cancel the network's main taskgroup.
2019-08-30 12:37:34 +02:00
ThomasV d0cfb3ae12 Remove early return in create_sweeptxs_for_our_ctx.
- This was added because we did not store the complete htlc history.
 - It makes the result dependent on the current channel state
 - That creates a race condition in sweep_info, because the result is cached.
 - As a result, test_breach_with_spent_htlc was randomly failing.
2019-08-30 09:11:54 +02:00
SomberNight 5f817770af android build: make sure to use correct pycryptodomex
note: buildozer casts all actual paths to lowercase but not the list of excluded paths...
see https://github.com/kivy/buildozer/blob/182d13f1027d4c16e04e1096c94ed3e488226330/buildozer/__init__.py#L775
2019-08-29 18:07:37 +02:00
EagleTM 01f582cc14 Remove electrumx.ml because of phishing (#5596) 2019-08-29 12:37:33 +00:00
SomberNight f403735191 lnpeer: reestablish_channel - don't replay unacked msgs they alrdy have
e.g. Alice sends upd1, upd2, upd3, commitment_signed, upd4, upd5.
Bob receives all of these; and sends a revoke_and_ack but there is
a disconnect before Alice receives the revoke_and_ack.
During reestablish, if Bob claims to have received the commitment_signed,
Alice must not replay the msgs before that; but she should replay upd4 and upd5.
2019-08-29 12:37:25 +02:00
ThomasV 2583decc64 Merge pull request #5593 from wakiyamap/patch-1
Fix travis error
2019-08-29 10:20:34 +02:00
Jin Eguchi 523de5782b Fix travis error 2019-08-29 04:32:32 +09:00
SomberNight 2ee881f40a qt channels list: fields should not be editable 2019-08-28 16:54:51 +02:00
SomberNight db8e6cabb4 bip70 payreq: catch TimeoutError to avoid hanging "please wait" dialog
related #5337
2019-08-27 18:03:01 +02:00
ThomasV 3076eb75ea make parsing lightning qr codes more robust 2019-08-27 17:12:43 +02:00
ThomasV 31a18f83f1 (trivial) fix variable name 2019-08-27 13:35:03 +02:00
ThomasV 7866caf2a7 minor fix: ensure request amount is not None 2019-08-26 16:59:38 +02:00
ThomasV cf02e32f20 Merge pull request #5537 from xaya/test-verify-header
Unit tests for Blockchain.verify_header
2019-08-26 15:42:15 +02:00
ThomasV 58177c5bf3 Travis: run regtests in separate job 2019-08-26 13:52:55 +02:00
ThomasV fcfbc937bc buildozer: use log_level=1 2019-08-26 11:35:17 +02:00
ThomasV d766ded8d4 Merge pull request #5584 from JeremyRand/lnaddr-bech32
lnaddr: Pull in Bech32 and Base58 prefixes from constants
2019-08-25 18:58:47 +02:00
JeremyRand 8be94a9919 lnaddr: Pull in Bech32 and Base58 prefixes from constants
Fixes https://github.com/spesmilo/electrum/issues/5581
2019-08-25 13:15:13 +00:00
ThomasV 2b52ee26e6 store qt-console-history in wallet file (fix #5563) 2019-08-25 11:39:11 +02:00
ThomasV 95383a5820 Merge pull request #5582 from JeremyRand/test-lnchannel-outputs
Use NamedTuple notation for TxOutput in test_lnchannel
2019-08-25 10:17:54 +02:00
ThomasV 2944ae1b2f Merge pull request #5583 from JeremyRand/test-lnrouter-rev-genesis-bytes
test_lnrouter: Pull in chain_hash from constants
2019-08-25 10:17:06 +02:00
JeremyRand 032810dace test_lnrouter: Pull in chain_hash from constants 2019-08-25 07:19:36 +00:00
JeremyRand 334d3f2818 Use NamedTuple notation for TxOutput in test_lnchannel
This makes the code more resilient in case additional members are added
to TxOutput later.
2019-08-25 06:51:31 +00:00