Commit graph

12997 commits

Author SHA1 Message Date
SomberNight
ee24c74f19
lnchan.receive_revocation: tolerate not having htlc fail reason
If we get a revack after reestablish, but the fail_htlc was already
committed in a previous app-session, the fail_htlc will not be re-sent and
we will not have the reason (as it's not persisted).

fixes #6675
2020-10-23 02:35:20 +02:00
ThomasV
7110fde25d follow-up: fix qt lightning dialog if gossip is not started 2020-10-22 19:20:22 +02:00
ThomasV
f155f3aff5 start lngossip if instantiated; this saves a boolean 2020-10-22 18:48:27 +02:00
ThomasV
5d90790726 wallet.py: always instantiate lnbackups 2020-10-22 18:35:49 +02:00
bitromortac
1855bcb17d qt: reflect running gossip in lightning icon 2020-10-22 18:05:51 +02:00
bitromortac
750147d931 kivy: display warning when first channel is opened 2020-10-22 18:05:51 +02:00
bitromortac
6a0ada3f79 qt: display warning when first channel is opened 2020-10-22 18:05:51 +02:00
bitromortac
bdca7be1c7 kivy: remove enable/disable button 2020-10-22 18:05:51 +02:00
bitromortac
bba995ada3 qt: remove enable/disable button 2020-10-22 18:05:51 +02:00
bitromortac
3c3a59c517 cli: remove enable/disable lightning 2020-10-22 18:05:51 +02:00
bitromortac
3314c149f2 qt: show channels tab by default if ln wallet 2020-10-22 18:05:51 +02:00
bitromortac
42df51f2dd qt: remove node suggestion 2020-10-22 18:05:51 +02:00
bitromortac
b543874670 gossip: start gossiping when channel is open 2020-10-22 18:05:51 +02:00
bitromortac
4efcb53d24 network: load gossip db early
The gossip db is loaded early when the network is started to save
time when the gui is locked and a wallet not yet loaded. Side effects
of the LNWallet to start peering when a channel db is loaded is
circumvented.
2020-10-22 18:05:51 +02:00
bitromortac
6045de759b lightning: enable by default but without gossip
Enables lightning by creating a node private key and storing it in
the wallet. The gossiper is not launched at start up, only if there
are existing channels.
2020-10-22 18:05:51 +02:00
ThomasV
edc593a886 submarine swap: add comment to explain witness script asymmetry 2020-10-22 17:24:44 +02:00
SomberNight
08f70420e3
submarine_swaps: describe event-flow for both swap direction in docstr
So that I don't have to figure out every time.
2020-10-22 17:22:35 +02:00
SomberNight
21e46fb147
contrib: add instructions re cross-compiling libsecp to Linux x86
related: #6669

(note that instructions assume this commit as otherwise AUTOCONF_FLAGS is overwritten!)

based on https://stackoverflow.com/a/17748092
2020-10-21 03:27:42 +02:00
SomberNight
914b606cb9
kivy: fix app not even starting
```
  File "/home/user/venvs/electrum37/lib64/python3.7/site-packages/kivy/lang/builder.py", line 654, in _apply_rule
    child = cls(__no_builder=True)
TypeError: __init__() got an unexpected keyword argument '__no_builder'
```

follow-up c70484455c
2020-10-20 14:55:39 +02:00
SomberNight
8ac6d3b17d
wallet.get_history: take locks.
Re the check at the end: "history not synchronized" - it's not that it's not synchronized,
rather that the history is changing while being computed.
2020-10-18 22:21:06 +02:00
SomberNight
777095fda8
wallet: simplify get_history
some years ago wallet.get_tx_delta returned Optional[int] but it returns int now
2020-10-18 22:14:52 +02:00
SomberNight
f125a06453
wallet: simplify get_wallet_delta 2020-10-18 20:37:29 +02:00
SomberNight
da6080421e
wallet_db: WalletDB.get_txo_addr now returns dict instead of list 2020-10-18 20:37:25 +02:00
SomberNight
e71fa4924f
wallet: rm wallet.txin_value 2020-10-18 20:37:21 +02:00
SomberNight
8b2eb83238
wallet: use get_txin_value in get_wallet_delta 2020-10-18 20:37:18 +02:00
SomberNight
55b5335ebb
qt tx dialog: always show input amounts if we know them
Previously we would only show input amounts for partial txs.
Now also show them for complete txs as well, if we know them:
we check in the wallet db for the prevtx and read the value for the output.
This is safe as the input commits to the prevout via txid (which commits to the output value).

Also show "from addresses" in more cases in a similar fashion.
2020-10-18 20:37:14 +02:00
SomberNight
82c8c4280f
lnworker: add request_remote_force_close which can be used without state
see #6656
2020-10-17 03:59:50 +02:00
SomberNight
c3fb79d412
lnworker: make sure to save new channel before we broadcast
see #6656
2020-10-17 03:47:29 +02:00
SomberNight
c5da22a9dd
network: tighten checks of server responses for type/sanity 2020-10-16 19:30:42 +02:00
SomberNight
c70484455c
kivy: use our logger, not kivy's; and log more exceptions. 2020-10-16 17:55:40 +02:00
Benoît Verret
e66a5bbfc4
Use default sys.ps1 and ps2 as console prompts (#6651)
sys.ps1 and sys.ps2 define the strings used as primary and secondary
prompts in the Python interpreter.

Also fix a rare bug introduced by myself in 7772af6 (#6607) where
spaces at the end of the current line would not be remembered when
switching server.
2020-10-16 15:37:02 +00:00
SomberNight
547b231b80
config: make sure fee_per_kb() returns Optional[int]
electrs sends fee histogram with float feerates
2020-10-15 19:50:59 +02:00
SomberNight
ef84716e8b
(trivial) kivy: rename title of DSCancelDialog
For an action called "Cancel transaction" it is confusing to have a "Cancel" button
that cancels the action... not sure how to fix -- this is perhaps the least intrusive change
2020-10-15 17:38:41 +02:00
ThomasV
aebe77867d prepare release 4.0.4 2020-10-15 17:37:46 +02:00
SomberNight
695ad757c7
frozen deps: don't use colorama 0.4.4
until https://github.com/tartley/colorama/issues/284 is resolved

colorama 0.4.4 does not have a source dist uploaded to PyPI, which breaks contrib/make_packages

this partially reverts 4d0afffbcd
2020-10-15 17:11:33 +02:00
SomberNight
9bc4182924
crypto: check version of pycryptodomex/cryptography at runtime
As these pkgs are often provided by the OS package manager (e.g. apt),
the version limits specified in requirements*.txt and setup.py will never
get applied.
2020-10-15 16:25:06 +02:00
SomberNight
e4e6c4fb1b
update locale submodule 2020-10-15 16:19:14 +02:00
SomberNight
4d0afffbcd
rerun freeze_packages 2020-10-15 15:57:39 +02:00
SomberNight
1d187d36f0
(fix) allow opening LN wallet with --offline 2020-10-15 14:20:51 +02:00
ghost43
97c79d52f9
Merge pull request #6649 from benma/bitbox02-9.2.0
BitBox02 v9.2.0: support for signing messages and for p2wsh-p2sh legacy multisig accounts
2020-10-15 10:08:24 +00:00
Marko Bencun
a8f8175674
plugins/bitbox02: add support for signing a message 2020-10-14 20:33:54 +02:00
Marko Bencun
8fa019f65b
plugins/bitbox02: add support for p2wsh-p2sh multisig 2020-10-14 20:33:54 +02:00
Marko Bencun
2c0ae4abdd
contrib/requirements/requirements-hw.txt: bump bitbox02 dep to 5.0.0
Adds the api functions to sign a message and use p2wsh-p2sh legacy
segwit multisig.
2020-10-14 20:33:54 +02:00
SomberNight
a59aec9194
update release notes 2020-10-14 20:04:49 +02:00
SomberNight
bde415cae7
wallet: don't try to get_input_tx from network when offline
related: https://github.com/spesmilo/electrum/issues/6648#issuecomment-708499893

Trying to fetch the prev tx from the network is a blocking operation with
a 10 sec timeout - we should not hang for 10 seconds if there is no network connection.
2020-10-14 19:30:10 +02:00
bitromortac
292016d283
network dialog: include protocol in server address field (#6624)
* network-dialog: include protocol in server field

In this way it is now possible again to use plain server connections
without reverting it automatically to tls connections.

* qt network dialog: hide trailing protocol ":s" in TextEdit

This hides some complexity from casual users, while still allowing
advanced users to set the protocol.

Co-authored-by: SomberNight <somber.night@protonmail.com>
2020-10-14 16:28:31 +00:00
ghost43
83143f421a
Merge pull request #6641 from SomberNight/202010_dscancel
wallet: implement cancelling tx by double-spending to self ("dscancel")
2020-10-13 17:42:10 +00:00
SomberNight
082b2b3585
qt console: fix copying text using Ctrl+C
follow-up #6643
2020-10-13 19:21:32 +02:00
SomberNight
c69ce73814
qt coins tab: label(utxo) to consider both label(txid) and label(addr)
related: #6644
2020-10-13 18:57:59 +02:00
SomberNight
4b6c86ecbe
wallet: make labels private, and access to need lock
e.g. labels plugin iterated over wallet.labels on asyncio thread while user could trigger an edit from Qt thread
2020-10-13 18:57:55 +02:00