Commit graph

12039 commits

Author SHA1 Message Date
SomberNight
3d42fca86e
daemon.run_gui: make sure to exit process on exception
previously, if GUI-related imports raised, the GUI would not start
but the process would not exit (e.g. asyncio event loop would go on)

Traceback (most recent call last):
  File "...\electrum\electrum\daemon.py", line 517, in run_gui
    gui = __import__('electrum.gui.' + gui_name, fromlist=['electrum'])
  File "...\electrum\electrum\gui\qt\__init__.py", line 39, in <module>
    from PyQt5.QtGui import QGuiApplication
ImportError: DLL load failed while importing QtGui: The specified module could not be found.
2020-02-19 15:45:36 +01:00
ThomasV
300888f21c fix path for payserver static files 2020-02-19 11:47:43 +01:00
ThomasV
317d405432 follow-up previous commit 2020-02-19 11:39:52 +01:00
ThomasV
cc6e461d3e storage upgrade for invoices and requests. fixes #5959 2020-02-19 11:26:03 +01:00
ThomasV
21fffeb7ad do not store 'outputs' field in requests (it is unused) 2020-02-19 11:24:44 +01:00
SomberNight
9c5e49f432
ecc.ECPubkey: also accept bytearray in __init__
regression since #5947

Traceback (most recent call last):
  File "...\electrum\electrum\base_wizard.py", line 339, in on_device
    self.plugin.setup_device(device_info, self, purpose)
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 598, in setup_device
    client.get_xpub("m/44'/0'", 'standard') # TODO replace by direct derivation once Nano S > 1.1
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 55, in catch_exception
    return func(self, *args, **kwargs)
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 124, in get_xpub
    eckey=ecc.ECPubkey(publicKey),
  File "...\electrum\electrum\ecc.py", line 145, in __init__
    self._x, self._y = _x_and_y_from_pubkey_bytes(b)
  File "...\electrum\electrum\ecc.py", line 119, in _x_and_y_from_pubkey_bytes
    ret = _libsecp256k1.secp256k1_ec_pubkey_parse(
ctypes.ArgumentError: argument 3: <class 'TypeError'>: wrong type
2020-02-19 00:40:33 +01:00
SomberNight
0845300150
qt InstallWizard: turn some instance variables to locals 2020-02-18 21:12:46 +01:00
ThomasV
fe4ca4c466 follow-up previous commit 2020-02-18 20:06:35 +01:00
ThomasV
c9e39d3a79 remove channel from channel_timestamps if funding_tx has been dropped from mempool 2020-02-18 18:04:23 +01:00
ThomasV
e05cd2006a fix get_payments 2020-02-18 17:40:13 +01:00
SomberNight
d1fc4399e6
lnwatcher: use is_mine(addr) instead of (addr in get_addresses())
small performance gain
2020-02-18 17:16:46 +01:00
ThomasV
72f4e83333 fix race in check_onchain_situation 2020-02-18 17:06:54 +01:00
ThomasV
b90cbeb0ba fix flake8 test 2020-02-18 14:05:28 +01:00
ThomasV
6696f40e36 follow-up previous commit: show onchain tx dialog for channel open/close transactions 2020-02-18 13:58:17 +01:00
ThomasV
feb47b0a6f Add lightning tx dialog (qt and kivy) 2020-02-18 13:02:18 +01:00
ThomasV
b3a3267ede follow-up a6302b3a12 2020-02-18 12:39:18 +01:00
SomberNight
46d8080c76
ln gossip: don't put own channels into db; always pass them to fn calls
Previously we would put fake chan announcement and fake outgoing chan upd
for own channels into db (to make path finding work). See Peer.add_own_channel().
Now, instead of above, we pass a "my_channels" param to the relevant ChannelDB methods.
2020-02-17 20:38:41 +01:00
SomberNight
7d65fe1ba3
Qt ChannelsList: cosmetics (set font, enable sorting) 2020-02-17 19:45:27 +01:00
SomberNight
b50c47c5ce
qt exc reporter: add FIXME re HTML tags in traceback 2020-02-17 19:44:12 +01:00
SomberNight
16626a3386
lnutil.split_host_port: fix for IPv6 connection string 2020-02-17 19:43:21 +01:00
SomberNight
0723355a0f
util.Satoshis: note that sometimes this actually has 'msat' precision 2020-02-17 16:52:25 +01:00
SomberNight
a6302b3a12
fix wallet history order: incl both on-chain and LN, sorted by time
GUIs now respect order of wallet.get_full_history(), which is probably the sane
thing to do, given that is the order the "balance" column is calculated in.

fixes #5958
2020-02-17 16:33:54 +01:00
ThomasV
0869e09275 Qt: fix balance column 2020-02-17 14:55:10 +01:00
ThomasV
4dc74870e1 Catch exceptions raised in LNWorker._pay_to_route
Reset payment status if an exception is caught.
Also, do not pass status to the 'invoice_status' network callback.
This fixes #5869, #5870, #5964.
2020-02-17 12:33:43 +01:00
ThomasV
472c0defee fix lnchannel.get_payments: unsettled htlcs may have overwritten the returned results. 2020-02-17 12:19:18 +01:00
ThomasV
6e6e829ef7 breach remedy: get spender transaction from LNWatcher's db 2020-02-17 09:19:23 +01:00
ThomasV
098af02789 kivy: pass message to password_dialog (follow-up d9172ade71) 2020-02-17 09:16:29 +01:00
ThomasV
58a0a9b160 kivy send screen: always show field separators. fix on_clear. 2020-02-16 23:48:23 +01:00
ThomasV
eb28f57051 (minor) kivy: initialize invoice_popup 2020-02-16 19:32:18 +01:00
ThomasV
938fab86d1 detect redeemed channels (fix #5963) 2020-02-16 19:07:20 +01:00
ThomasV
f8da0f87a7 follow-up previous commit 2020-02-16 14:45:04 +01:00
ThomasV
3a35f90aa0 Do not use network callback to update channel states; call LNWorker methods directly instead.
A callback was used because a single LNWnwatcher object used to be shared for all wallets.
Since wallet now have their own LNWatcher instance, this can be simplified.
2020-02-16 14:26:18 +01:00
ThomasV
36f32651cc Define network.try_broadcasting() method.
Use it when rebroadcasting a force-close tx,
because the channel state is already set.
2020-02-16 12:59:09 +01:00
ThomasV
dba6cb8a96 lnwatcher: use height == TX_HEIGHT_LOCAL to determine channel onchain state 2020-02-16 12:57:25 +01:00
ThomasV
e7c02f1935 switch menus: status <-> wallets 2020-02-15 18:36:55 +01:00
ThomasV
bb739f4de9
Merge pull request #5951 from spesmilo/ln_backups
save wallet backups on channel creation
2020-02-15 17:31:14 +01:00
ThomasV
5ae6e43323 message formatting 2020-02-15 17:27:33 +01:00
ThomasV
e3ccfe6449 kivy: make backups optional 2020-02-15 17:26:03 +01:00
ThomasV
d9172ade71 kivy: use password + pin_code
- password is per wallet, is retained in memory
 - pin code is saved in config
2020-02-15 17:09:09 +01:00
SomberNight
497d6019e1 kivy/android: ask for STORAGE permission at runtime 2020-02-15 16:28:15 +01:00
ThomasV
d5dc8d1ab2 kivy: save pin code in memory 2020-02-15 16:28:15 +01:00
ThomasV
2dad87cbb4 Automate backups:
- backup wallet file on each channel creation
 - on android, a backup password is entered in settings
 - on desktop, the backup path is in settings
2020-02-15 16:28:15 +01:00
ThomasV
cee8607218 save_backup: use db.dump() to clone the db 2020-02-15 16:28:15 +01:00
ThomasV
88d5cdf87c fix test_lnpeer 2020-02-15 16:28:15 +01:00
ThomasV
87b7d2c0c0 wallet backup function for kivy/android 2020-02-15 16:28:15 +01:00
SomberNight
d6b4b19824 kivy: allow generic passwords for wallets 2020-02-15 16:28:15 +01:00
ThomasV
2f10bc2f4d reestablish: force_close if we are a recent backup 2020-02-15 16:28:15 +01:00
ThomasV
62eceeb573 Save and read lighting backups (Qt) 2020-02-15 16:28:15 +01:00
SomberNight
edc00b448f
fix lightning "init" msg assertion error
closes #5962
2020-02-15 15:25:41 +01:00
SomberNight
a6e3a244e8
add comment re lnchannel channel_states 2020-02-14 16:15:25 +01:00