Commit graph

3227 commits

Author SHA1 Message Date
ThomasV
17a893441a qt: add extra fields to copy submenus 2020-03-06 09:05:32 +01:00
ThomasV
e48c7d01cd Qt: add 'View channel' to history menu, 'View funding transaction' to channel menu 2020-03-06 08:47:31 +01:00
ThomasV
c3c6b81857 kivy: show closing transaction in channel dialog 2020-03-06 06:49:46 +01:00
ThomasV
7c77d7c176 kivy: improve channel detaild dialog 2020-03-06 05:50:45 +01:00
ThomasV
a059fa0c1f fix #6017 2020-03-06 04:27:03 +01:00
SomberNight
fa0ef9c548
ln: store network addresses for channel counterparties in channels
So we can reconnect to them without relying on gossip db.
2020-03-06 04:04:17 +01:00
SomberNight
942e03e3ae
kivy README: add instructions re accessing internal storage 2020-03-05 19:01:55 +01:00
SomberNight
60ad5e6a52
kivy pw dialog: don't enforce min length for existing generic password
this allows opening short-password wallets on desktop
2020-03-05 18:09:17 +01:00
SomberNight
2aebcc5e26
commands: gate get_channel_ctx behind --iknowwhatimdoing 2020-03-05 17:27:43 +01:00
SomberNight
fc80f7a874
update block header checkpoints 2020-03-05 17:19:48 +01:00
SomberNight
bf4b2a15a6
wallet_db: fix _convert_version_25 (bip70 expiration) 2020-03-05 17:15:09 +01:00
ThomasV
c15cc42a32 fix for old channels 2020-03-05 14:52:56 +01:00
ThomasV
496de03869 (minor) typo 2020-03-05 14:43:10 +01:00
ThomasV
0c3565bd4d kivy: show warning if request/invoice exceeds channel capacity 2020-03-05 14:30:01 +01:00
ThomasV
e362b4b94c kivy invoices and requests: show most recent items first 2020-03-05 13:15:32 +01:00
ThomasV
69b58433bf kivy: Show lightning balance. Remove 'unmatured', 'unconfirmed'
from info dialog, as this is visible in history.
2020-03-05 13:02:17 +01:00
ThomasV
c2f9c5fb1b kivy: fix layout of addresses dialog 2020-03-05 12:06:30 +01:00
ThomasV
eadd5d58e8 kivy: improve open_channel dialog 2020-03-05 11:54:33 +01:00
ThomasV
cb14bde422 fix test_lnpeer 2020-03-05 11:10:14 +01:00
ThomasV
7f3542f080 lnworker: set invoice status if htlcs are received from previous session 2020-03-05 10:51:22 +01:00
ThomasV
bf4a9d7909 (minor) ButtonsWidget: add 10px offset because of scrollbar 2020-03-05 10:47:42 +01:00
ThomasV
dbd77b7d8e
Merge pull request #6014 from SomberNight/20200304_pycryptodomex
add 'cryptography' as optional dependency; clean README and sdist
2020-03-05 09:17:42 +01:00
ThomasV
8f3fcdd1a8 Fix detection of payments.
1. In lnhtlc, sent_in_ctn and failed_in_ctn need to look at the
remote ctx, and they need to be called when we receive a revocation,
not when we send one.

2. In lnchannel, we use 3 lnworker callbacks:
   - payment sent/payment failed (called when we receive a revocation)
   - payment received (called when we send a revocation)

3. Make revoke_current_commitment return a single value.
The second value was only used in tests, there is no need
to bloat the code with that
2020-03-05 07:03:09 +01:00
ThomasV
b9eaba3e85 replace await_local/remote 2020-03-05 07:03:09 +01:00
SomberNight
74a3faf803
crypto: add 'cryptography' as alt dependency for 'pycryptodomex' 2020-03-04 18:54:20 +01:00
SomberNight
18f3a37032
crypto: move LN-related chacha20/poly1305 code into crypto.py 2020-03-04 17:58:43 +01:00
SomberNight
dae842e2ad
tests: made TestLNTransport.test_loop more robust 2020-03-04 17:57:40 +01:00
SomberNight
7962e17df6
invoices: deal with expiration of "0" mess
Internally, we've been using an expiration of 0 to mean "never expires".
For LN invoices, BOLT-11 does not specify what an expiration of 0 means.
Other clients seem to treat it as "0 seconds" (i.e. already expired).
This means there is no way to create a BOLT-11 invoice that "never" expires.

For LN invoices,
- we now treat an expiration of 0, , as "0 seconds",
- when creating an invoice, if the user selected never, we will put 100 years as expiration
2020-03-04 14:24:07 +01:00
ThomasV
4c177c4c92 less verbose update_fee log 2020-03-04 08:35:56 +01:00
SomberNight
01981f71fb
lnworker.add_peer: don't block event loop with DNS 2020-03-03 21:04:54 +01:00
SomberNight
fbd0c9aae8
lnworker: peer-bootstrapping: add IPv6 fallback nodes 2020-03-03 20:40:50 +01:00
SomberNight
59a428ea7f
lnworker: re-enable dns seeds for peer-finding bootstrap
but only for mainnet
2020-03-03 20:12:12 +01:00
ThomasV
c986e522bf backup help text 2020-03-03 13:50:11 +01:00
ThomasV
9ed9fe7002 open channel dialog improvements 2020-03-03 13:06:37 +01:00
ThomasV
f67011d477 Qt: do not filter out paid invoices/requests. let user delete multiple items 2020-03-03 12:56:44 +01:00
ThomasV
89fa9b5090
Merge pull request #5898 from leo-lb/plausible-deniability-config
Add command line option to forget config on exit.
2020-03-03 11:50:04 +01:00
ThomasV
a52ac0cc74 (minor) text change: 'Expires after' 2020-03-03 11:40:01 +01:00
ThomasV
94443ebe5e Qt: list requests and invoices in descending order 2020-03-03 11:25:54 +01:00
ThomasV
abb0760616 Simplify receive tab:
- display receiving address in receiving tabs
 - display lightning invoice as 'address'
 - save last active tab in preferences
2020-03-03 11:10:48 +01:00
SomberNight
99f736f3e7
ChannelDB.load_data: add comment re bad performance, and some speed-up
On my machine, ChannelDB.load_data() went from around 6 sec to 4 sec,
just by commenting out that assert in lnmsg.

related #6006
2020-03-03 04:05:36 +01:00
SomberNight
4d6b0184b9
ChannelDB: fix typo in sql query - seems harmless though? 2020-03-03 04:05:32 +01:00
SomberNight
3f9e761b67
ChannelDB: (trivial) add prefix to names of db methods
(and some type annotations)

This makes it clear these methods are not public.
2020-03-03 04:05:29 +01:00
SomberNight
53564f2496
ChannelDB: rm NodeAddress class, just use LNPeerAddr 2020-03-03 04:05:25 +01:00
SomberNight
cdb72509a7
lnrouter: change edge cost estimate (distance metric)
Old estimate was heavily biased towards simply minimising CLTV sum.
(fees had a too low weight; typically they were ~noise)
Now also take payment_amount into account.
2020-03-03 02:12:42 +01:00
ThomasV
367d30d6c0
Merge pull request #6003 from spesmilo/htlc_switch
Htlc switch
2020-03-02 22:14:09 +01:00
ThomasV
79497cd3ec (minor) rm unneeded decorator 2020-03-02 21:45:45 +01:00
ThomasV
97d191a121 maybe_forward_htlc: catch exceptions raised by nexp_peer. return only error 2020-03-02 21:18:56 +01:00
SomberNight
c81335fb44
lnrouter: simplify max fee sanity checks 2020-03-02 19:55:11 +01:00
SomberNight
2fab681444
bolt11 invoice: strip (and so accept with) leading/trailing whitespaces 2020-03-02 19:32:53 +01:00
SomberNight
660d7d137c
commands: add changegaplimit and getminacceptablegap cmds
There are some legitimate use-cases for changing the gap limit,
so just as it has already been possible to do in the GUI (using the console only! don't expose this to mere mortals.),
now CLI/RPC users have this exposed too.

The "changegaplimit" command will always raise unless invoked with the --iknowwhatimdoing option.

closes #5882

e.g.:
$ curl --data-binary '{"id":"curltext","jsonrpc":"2.0","method":"changegaplimit","params":{"new_limit": 30, "iknowwhatimdoing": true, "wallet":"~/.electrum/testnet/wallets/test_segwit_2"}}' http://user:password@127.0.0.1:7777
$ ./run_electrum --testnet changegaplimit 30 --iknowwhatimdoing -w ~/.electrum/testnet/wallets/test_segwit_2
2020-03-02 19:07:59 +01:00