Commit graph

12463 commits

Author SHA1 Message Date
ThomasV
a8c14e65ad follow-up prev commit 2020-05-05 09:57:01 +02:00
ThomasV
1529b07aa4 follow-up prev commit 2020-05-05 09:55:56 +02:00
ThomasV
c1b1638615 fix htlc forwarding:
- persist fail_htlc error messages
 - do not rely on payment_hash in htlc_switch
2020-05-05 09:23:48 +02:00
ThomasV
7cbb102c81 add test with fail_malformed_htlc to forwarding regtest 2020-05-05 09:04:17 +02:00
ThomasV
ab188ff375 add config variable to test update_fail_malformed_htlc 2020-05-04 20:31:44 +02:00
ThomasV
8ba7e68064 fix #6122: extract preimage from on-chain htlc_tx 2020-05-03 16:03:27 +02:00
ThomasV
f8019d9b6c
Merge pull request #6139 from JeremyRand/crypto-backend-typo
Fix "backed" typo in crypto.py
2020-05-03 05:52:20 +02:00
JeremyRand
62ca53cdf4
Fix "backed" typo in crypto.py 2020-05-03 03:08:28 +00:00
SomberNight
484e317bfa
android build: update p4a and buildozer
should fix travis issues
2020-05-03 04:06:06 +02:00
ThomasV
abe1bece2c remove UnknownPaymentHash (exception used as value) 2020-05-02 22:37:28 +02:00
ThomasV
a5a5048d53 lnpay: save invoice 2020-05-02 17:26:02 +02:00
ThomasV
085b6ca2ab jsonrpc: pass timeout to aiohttp session 2020-05-02 17:25:30 +02:00
ThomasV
123b8c1792 (minor) rename chan.sweep_htlc 2020-05-02 11:42:47 +02:00
ThomasV
f53a10084d create_sweeptxs_for_our_ctx: fix static_remotekey 2020-05-01 16:54:50 +02:00
SomberNight
5bf3115a4a
qt send tab: (fix) allow user to set lower fees if "not enough funds"
Previously if the user tried to pay an invoice, we tried to construct
a tx with the desired feerate. If this raise NotEnoughFunds, we would just
show the error and not let the user change the feerate.

related: https://github.com/spesmilo/electrum/issues/6136#issuecomment-622254754 (method 2)
2020-05-01 07:51:29 +02:00
SomberNight
b9bb78a1db
qt ConfirmTxDialog: fix exc for "max" invoice when "not enough funds"
"not enough funds" is possible even for "max" invoice due to fees

fixes #6136
2020-05-01 07:34:11 +02:00
SomberNight
0ee73378c9
daemon: rm "daemon.wallet" reference
related: #4905 -- when closing a wallet, it can get gc-ed now

TODO: PayServer needs to choose wallet somehow
2020-05-01 06:56:21 +02:00
SomberNight
0f6cbfba8e
qt update checker: do not keep main window ref so it can gc-ed
related: #4905
2020-05-01 06:39:55 +02:00
SomberNight
2105c6c4e6
qt exception window: turn Exception_Hook into singleton
related #4905
related Electron-Cash/Electron-Cash@6a3d76b0ab

conceptually did not really make sense that the Exception_Hook kept a reference
to an ~arbitrary main window (preventing gc)
2020-05-01 06:33:38 +02:00
SomberNight
2b1a150c52
multi-wallet: properly stop lnworker/lnwatcher 2020-05-01 04:50:08 +02:00
SomberNight
8389892dbd
lnpeer: (trivial) log name for chan.state and chan.peer_state
IntEnum.__format__ just returns an int:

>>> from enum import IntEnum
>>> class Colours(IntEnum):
...   red = 1
...   blue = 2
...
>>> var = Colours.red
>>> f"{var}"
'1'
>>> f"{var!s}"
'Colours.red'
>>> f"{var!r}"
'<Colours.red: 1>'
2020-05-01 03:43:12 +02:00
SomberNight
9ac41be1e8
network: set .oneserver in __init__
fixes #6135
2020-05-01 03:27:31 +02:00
SomberNight
6f7a4ab048
lnpeer: add get_channel_by_id, for small speed-up 2020-04-30 21:13:29 +02:00
SomberNight
b9b53e7f76
lnworker: fix threading issues for .channels attribute
external code (commands/gui) did not always take lock when iterating lnworker.channels.
instead of exposing lock, let's take a copy internally (as with .peers)
2020-04-30 21:08:26 +02:00
SomberNight
f5eb91900a
use correct feerate when sweeping htlcs
fixes #6131
2020-04-30 19:37:06 +02:00
ThomasV
ab5338b46b fix #6111, and show channels tab even if lightning is disabled (follow-up 527e0b9b89) 2020-04-29 11:41:57 +02:00
SomberNight
527e0b9b89
qt main window: only show "Channels" tab if wallet has lightning 2020-04-26 05:51:02 +02:00
SomberNight
100a216165
qt wallet>info: add text if lightning is not available for wallet 2020-04-26 05:49:34 +02:00
SomberNight
b59c3294b2
fix #6115: qt wallet>information was broken for imported wallets 2020-04-26 05:29:32 +02:00
ThomasV
853f42dbbb
Merge pull request #6114 from SomberNight/202004_qt_network_dialog
qt network dialog: merge "Overview" and "Servers" tabs
2020-04-25 10:33:55 +02:00
SomberNight
58dee38ed2
qt network dialog: merge "Overview" and "Servers" tabs 2020-04-25 06:54:31 +02:00
SomberNight
bf223470ce
network: handle unparseable server-str
follow-up 9e57ae630b

fixes #6113
2020-04-25 06:53:25 +02:00
SomberNight
56a9ccca6d
interface: make localhost exempt from ip-range bucketing 2020-04-25 06:38:26 +02:00
SomberNight
38980a4f5c
interface: (trivial) make some methods private 2020-04-24 17:18:05 +02:00
SomberNight
69de3b94db
config: "serverfingerprint" key requires "server" key
follow-up prev
2020-04-24 17:17:12 +02:00
Luke Childs
ca1046bce2
Add --serverfingerprint option (#6094)
* Add --fingerprint option

* Simplify conditional checks

* Improve warning wording

* Throw error instead of logging and returning

* --fingerprint => --serverfingerprint

* Only run fingerprint checks against main server

* Throw error if --serverfingerprint is set for a non SSL main server

* Fix linting errors

* Don't check certificate fingerprint in a seperate connection

* Disallow CA signed certs when a fingerprint is provided

* Show clear error and then exit for Qt GUI users

* Remove leading newlines from error dialog

* Always check is_main_server() when getting fingerprint

* Document how to generate SSL cert fingerprint
2020-04-24 14:11:40 +00:00
SomberNight
e2ae44beb9
commands: "notify" cmd: stop watching addr if called with empty URL
closes #5881
2020-04-24 15:34:55 +02:00
SomberNight
54fdb011f9
fixups for CallbackManager refactor
9224404108
2020-04-24 15:32:05 +02:00
ThomasV
f4dc93cb7d lnworker: blacklist channel if policy is unchanged but has a new timestamp. 2020-04-24 12:16:21 +02:00
ThomasV
2d0ef78a11 channel_db: add verbose option to add_channel_update 2020-04-24 11:45:39 +02:00
Evgeny Zinoviev
64733a39dc
set more restrictive file permissions for exported private keys (#6106) 2020-04-21 23:01:41 +00:00
Jin Eguchi
1846154ca3
build: update git in dockerfiles (#6107) 2020-04-21 22:48:01 +00:00
ThomasV
bdb870af00 follow-up c454564ed6 2020-04-21 15:31:13 +02:00
ThomasV
0b6ae1dbff fix #6101 2020-04-20 18:55:07 +02:00
ThomasV
4d01a550c4 fix #6103: local config contains remote reserve 2020-04-20 18:48:41 +02:00
ThomasV
1a4d33086b refactoring: remove inspect_edge 2020-04-20 11:48:38 +02:00
ThomasV
ec5330fc21 separate method that runs Dijkstra and return distances 2020-04-20 11:47:29 +02:00
SomberNight
f52072e169
follow-up prev
we can't just test with a 1 msat htlc as that might be below htlc_minimum_msat
2020-04-18 18:51:20 +02:00
SomberNight
12d771737a
fix #6096: bugfix for creating zero amount LN invoice
(also there was a unit-mismatch here...)
2020-04-18 05:56:12 +02:00
SomberNight
8f4c384aad
qt crash reporter: html.escape traceback to avoid formatting issues
fixes #6099
2020-04-18 05:48:11 +02:00