Commit Graph

11962 Commits

Author SHA1 Message Date
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
ThomasV bb21e01823 (minor) call lnwatcher.add_channel from lnworker.add_channel 2020-02-14 14:15:15 +01:00
ThomasV 471fdd1d97 follow-up previous commit 2020-02-14 13:37:45 +01:00
ThomasV 2a7b5081c9 channel states: make sure that closing_txid is saved if channel is closed 2020-02-14 13:25:04 +01:00
SomberNight 111ef9ebb1 follow-up fixes to storage-db separation
e1ce3aace7
2020-02-13 20:00:12 +01:00
SomberNight 5d8d8f743a kivy: more reliable saving of "last wallet"
The intended behaviour is that when the user launches the app,
the wallet we try to open is the wallet most recently opened by the user.
The old code in 'on_stop' in practice only got called if the user exited via
repeatedly pressing the system 'back' button.

related #5952
2020-02-13 03:12:32 +01:00
SomberNight 091f6ced58 android build: update buildozer and p4a versions
also update NDK version (new p4a demands it)
2020-02-13 02:25:04 +01:00
SomberNight ab4e2dd9f0 wallet: fix is_mine/can_sign. don't just rely on ks, also check script
Previously a standard (single-sig) wallet would consider a multisig txin as is_mine
(if the keystore found its pubkey in the txin).

fixes #5948
2020-02-12 18:14:07 +01:00
SomberNight 0d33da2f95 wallet: (sanity) is_mine now guaranteed to handle 'None' input 2020-02-12 18:14:04 +01:00
SomberNight 07f5d6b745 keystore: 'get_tx_derivations' no longer public 2020-02-12 18:14:00 +01:00
ThomasV beee880dba fix data_loss_protect (missing return, json conversion) 2020-02-12 14:19:31 +01:00
ThomasV 9734546fe9 test_lnpeer: use less side-effects 2020-02-12 10:32:55 +01:00
ThomasV e3630d87b2 test_lnpeer: test_reestablish_with_old_state 2020-02-12 10:22:22 +01:00
ThomasV 3377627070 reestablish_channel: shorter varnames 2020-02-12 06:18:22 +01:00
ThomasV 69ef9aa3d7 channel_reestablish: assume that DLP is enabled, because we require it 2020-02-11 21:39:23 +01:00
SomberNight e42e17779d windows: dll-load 'hack' needs to be applied not only from main script
but also when running tests, or just importing electrum from an interpreter
2020-02-11 20:57:37 +01:00
SomberNight 23a93ef7ad windows: when running from source, load DLLs from main dir
Load DLLs from inner 'electrum' dir instead of '.dlls'.
To make it consistent with where we expect libsecp256k1 (.dll/.so) be.
(note that while in case of libsecp we specifically already search the main dir,
without this change, other DLLs such as libusb or libzbar would not be found there)
2020-02-11 20:57:34 +01:00
SomberNight e8118e1845 gitignore: add .so/.dll in inner 'electrum' folder 2020-02-11 20:57:30 +01:00
ThomasV 9ccfa318f8 add new peer_state for the case where we are waiting for the remote party to force close a channel 2020-02-11 20:55:52 +01:00
ThomasV 8688a6530a reestablish_channel: do not send second channel_reestablish message if they are ahead (they should know it) 2020-02-11 20:42:16 +01:00
ThomasV ece75c3244 test_lnpeer: simple test of channel_reestablish 2020-02-11 19:53:21 +01:00
ThomasV 28dc1928a0 Merge pull request #5947 from SomberNight/202002_ecdsa
make libsecp256k1 a mandatory dependency
2020-02-11 19:05:12 +01:00
SomberNight f78589ec77 update README to mention libsecp 2020-02-11 17:33:06 +01:00
SomberNight 5b84e714f2 build: workaround for 'realpath' missing on macOS 2020-02-11 16:48:28 +01:00
SomberNight 4cec098d2d build: create a standalone build script for libsecp256k1
heavily based on Electron-Cash/Electron-Cash@eda015908e
2020-02-11 16:48:24 +01:00
SomberNight 1d72585b7d ecc: hard fail if libsecp256k1 is not found/usable 2020-02-11 16:46:35 +01:00
SomberNight de1ca27d63 tests: rm "needs_test_with_all_ecc_implementations" decorator
now libsecp256k1 is the only implementation
2020-02-11 16:46:31 +01:00
SomberNight 0a5ad9fda4 ecc: small API clean-up 2020-02-11 16:42:02 +01:00