Commit graph

11935 commits

Author SHA1 Message Date
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
SomberNight
288d793893
ecc: use libsecp256k1 for pubkey recovery (from sig and msg) 2020-02-11 16:41:59 +01:00
SomberNight
ab0c70e291
ecc: use libsecp256k1 for signature conversions
(instead of python-ecdsa)
2020-02-11 16:41:56 +01:00
SomberNight
ad408ea832
ecc: use libsecp256k1 for sign/verify/mul/add 2020-02-11 16:41:52 +01:00
SomberNight
2cf2135528
ecc: abstract away some usage of python-ecdsa: bytes<->int conversions 2020-02-11 16:41:49 +01:00
SomberNight
004acb906d
ecc: abstract away some usage of python-ecdsa: randrange 2020-02-11 16:41:45 +01:00
ThomasV
a600873cf9 move wrapper definition outside of main_window class 2020-02-11 11:08:33 +01:00
ThomasV
e1ce3aace7 Separate db from storage
- storage is content-agnostic
 - db and storage are passed to wallet contructor
2020-02-10 17:45:23 +01:00
ThomasV
c61e5db6a9 fixes for text interface 2020-02-08 12:35:07 +01:00
SomberNight
f9960a5fe2
qt: don't clear send tab in broadcast_done
no longer needed as fields are already cleared when user clicks Save/Pay
2020-02-07 20:11:08 +01:00
SomberNight
34392e82b9
cosigner pool: easy fix (works but with worse than previous behaviour)
got broken as part of PSBT changes in #5721
2020-02-07 20:09:40 +01:00
Jin Eguchi
4313bde4c2
appimage: update libudev-dev (#5936) 2020-02-07 11:41:04 +00:00
ThomasV
7bd29ed8fc regtest: wait_for_balance 2020-02-05 08:56:58 +01:00
SomberNight
9d2629c5c3
blockchain.fork: better exception if datadir was deleted while running 2020-02-04 19:04:38 +01:00
SomberNight
f545d2b716
qt update checker: use longer timeout
closes #5899
2020-02-04 18:34:24 +01:00
SomberNight
3835157f41
cli: history commands: only json-encode once
closes #5868
closes #5931
2020-02-04 17:56:52 +01:00
ThomasV
dbceed2647 Restructure wallet storage:
- Perform json deserializations in wallet_db
 - use StoredDict class that keeps tracks of its modifications
2020-02-04 13:35:58 +01:00
ThomasV
0a9e7cb04e (minor) rename class: StoredAttr -> StoredObject 2020-02-04 13:34:57 +01:00
ThomasV
7507942b7a (minor) json_db: add file header, fix formatting 2020-02-04 12:43:04 +01:00
ThomasV
b08947a506 storage upgrade: convert lists to dict (txi, txo, revocation_store channels) 2020-02-04 12:11:18 +01:00
ThomasV
63963323be storage: take the DB lock when writing to disk. 2020-02-03 17:08:34 +01:00
ThomasV
73e656522e regests: organize tests in two classes 2020-02-03 15:16:15 +01:00
ThomasV
149cd9598a Separate JsonDB and WalletDB 2020-02-03 12:36:07 +01:00
ThomasV
8118bd1d72 use setEnabled() for Qt menu items: Network, Lightning, Watchtower 2020-02-02 22:40:23 +01:00
ThomasV
4ec86d36a8 faster and improved regtests
- print the test name before each test
 - start only needed agents (alice, bob, carol)
 - set settle_delay using setconfig instead of restarting daemon
 - test the watchtower ctn in test_watchtower
2020-02-02 15:07:28 +01:00
ThomasV
cded582fe9 Start watchtower if run_watchtower is set, even if lightning is not activated (fix #5896).
Fix parameters of sweepstore.add_sweep_tx, rm dead code.
2020-02-02 12:10:10 +01:00
ThomasV
e876cb0d93
Merge pull request #5913 from roth-a/master
Kivy: Adding address coloring to AddressPopup (Address Details)
2020-02-01 19:38:22 +01:00
Alexander Roth
b6a5f6f2fc Added coloring to the AddressPopup dialog:
- Moved the coloring logic (address_colors) from tx_dialog.py to a new file electrum/gui/kivy/util.py
- Added background_color to <RefLabel> in main.kv
- Calling address_colors in the initialization of AddressPopup and setting the foreground and background color

Code cleanup spaces

Code cleanup spaces

Fixed typo
2020-02-01 18:16:26 +01:00