1
0
Commit Graph

56 Commits

Author SHA1 Message Date
x
fffbccff3b make it easier to troubleshoot config parse errors
Change the logging message displayed when the config file can't be
parsed: include the underlying exception text, so that a user who is
attepting to edit the config manually can find and fix any errors.
2022-10-24 17:51:57 +02:00
avirgovi
b5d2b3c512 create chmod aware of XDG_RUNTIME_DIR
closes https://github.com/spesmilo/electrum/pull/7681
related https://github.com/spesmilo/electrum/issues/6334

Co-authored-by: avirgovi <avirgovi@cisco.com>
Co-authored-by: SomberNight <somber.night@protonmail.com>
2022-08-09 19:04:17 +02:00
SomberNight
7268fa55f2 config: abstract away mempool depth format str "%.1f MB from tip"
related: 4dd94172a6
(as that commit introduced depth targets that need more precision to display)
2022-03-31 22:50:31 +02:00
SomberNight
4dd94172a6 config: fee slider: add more steps in mempool mode
closes https://github.com/spesmilo/electrum/issues/6474
2022-03-29 20:22:09 +02:00
ThomasV
a15dac2b8c channel_establishment_flow: do not save wallet file backup in the background.
Instead, display a popup everytime, if the channel is not recoverable.
2022-03-24 14:55:45 +01:00
SomberNight
05649861c8 qt gui: more resilient startup: catch more exceptions, better fallback
fixes https://github.com/spesmilo/electrum/issues/7447

Consider this trace for 4.2.0:
```
Traceback (most recent call last):
  File "electrum/gui/qt/__init__.py", line 332, in start_new_window
  File "electrum/gui/qt/__init__.py", line 363, in _start_wizard_to_select_or_create_wallet
  File "electrum/gui/qt/installwizard.py", line 302, in select_storage
  File "electrum/util.py", line 504, in get_new_wallet_name
PermissionError: [Errno 1] Operation not permitted: '/Users/admin/Documents/Peach/MS'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "electrum/gui/qt/__init__.py", line 426, in main
  File "electrum/gui/qt/__init__.py", line 307, in wrapper
  File "electrum/gui/qt/__init__.py", line 349, in start_new_window
  File "electrum/util.py", line 504, in get_new_wallet_name
PermissionError: [Errno 1] Operation not permitted: '/Users/admin/Documents/Peach/MS'
```

Note that `get_new_wallet_name` (os.listdir) can raise OSError,
and we were calling that on the main entrypoint codepath without exception-handling.
We were also calling it in the fallback codepath without exception-handling.
i.e. the GUI errored out on every startup for affected users, and without CLI usage
it was not possible to recover.
2022-03-23 03:58:33 +01:00
SomberNight
1ff9f9910f ln update_fee: enforce that feerate is over default min relay fee
(this was always already the case when we are the funder, but we were
not checking it when remote is responsible for update_fee)
2021-09-28 19:48:31 +02:00
SomberNight
e7ccf1584e config: make adding thousand separators to amounts optional 2021-07-28 15:29:16 +02:00
djboi
6a431aab8c Fixed issue with thousands separator for better readability (#7427)
util.format_satoshis: introduce new option to add thousands separators
2021-07-28 13:26:30 +00:00
SomberNight
5891e039b1 config: add option to display amounts with msat precision 2021-07-20 20:35:44 +02:00
wakiyamap
639cd94dcb add signet support 2021-05-06 19:47:22 +09:00
SomberNight
7ffb2c3cb0 config: (trivial) add some type hints and rm unused variable 2021-04-15 19:00:46 +02:00
SomberNight
f53f177203 kivy swaps: handle no dynamic fee estimates
fixes #7215
2021-04-15 18:50:54 +02:00
ThomasV
18d7db12da Change warning shown on first channel creation
Qt: if created channel is not recoverable, show channel backup after creation
2021-03-24 10:24:14 +01:00
ThomasV
90d66953cf kivy: add confirm_tx_dialog, similar to qt 2021-01-19 14:15:07 +01:00
bitromortac
08ec368baf fee-slider: fix dialog crashes for float pos values 2021-01-18 10:38:15 +01:00
SomberNight
fc97181aa5 config: fix get_fee_text for static fees
mismatching units
2020-11-04 01:49:57 +01:00
SomberNight
ea22d0073e config: distinguish knowing mempool is empty vs not having mempool_fees
config.mempool_fees is now [] if server claims mempool is ~empty,
and None if no valid histogram has been received from server.
(previously it used to be [] in both cases)
2020-10-27 18:55:39 +01:00
SomberNight
c5da22a9dd network: tighten checks of server responses for type/sanity 2020-10-16 19:30:42 +02: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
caa68e2fe8 (trivial) config.get_netaddress: use NetAddress.from_string 2020-09-16 17:38:20 +02:00
SomberNight
b6db201570 util: small clean-up for format_satoshis 2020-06-22 02:46:16 +02:00
ThomasV
959af0065b follow-up previous commit: cleanup imports 2020-05-26 16:06:15 +02:00
ThomasV
7490787d38 follow-up previous commit 2020-05-26 15:55:47 +02:00
ThomasV
1c436bbc22 move units and amount formatting to simple_config 2020-05-26 15:49:28 +02:00
SomberNight
7da8c2dfe5 qt/kivy: show warning when sending tx with high fee/amount ratio
related: #6162
2020-05-15 20:00:59 +02:00
ThomasV
11aaa0b66f Simplify services (watchtower, payserver):
- Do not expose services settings in GUI
 - Use a single netaddress configuration variable.
2020-05-10 14:52:50 +02:00
ThomasV
b891d3dc85 new command: get_ssl_domain 2020-05-09 10:33:18 +02:00
SomberNight
69de3b94db config: "serverfingerprint" key requires "server" key
follow-up prev
2020-04-24 17:17:12 +02: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
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
Leo Le Bouter
f81db9cd1d Add command line option to forget config on exit.
By default, Electrum saves the last opened wallet's path as well as
recently opened wallets.

This can be damaging to plausible deniability.

Now it's possible to run Electrum with `--forgetconfig` to not
write to the config at all, which includes the wallet paths.
2020-01-21 13:32:02 +01:00
SomberNight
04edad9984 config: no longer singleton. it is passed to Wallet.__init__
The few other cases that used SimpleConfig.get_instance() now
either get passed a config instance, or they try to get a reference
to something else that has a reference to a config.
(see lnsweep, qt/qrcodewidget, qt/qrtextedit)
2019-09-22 20:46:01 +02:00
SomberNight
e9a1c05d23 bitcoin.relayfee: minor clean-up 2019-09-18 22:08:19 +02:00
ThomasV
1ecbafb920 add SSL context to watchtower server 2019-09-13 12:26:27 +02:00
ThomasV
7370910fee fix simple_config.estimate_fee 2019-09-11 11:49:32 +02:00
SomberNight
b2920db8b8 config: enforce that SimpleConfig is singleton
related: #5629
2019-09-10 18:01:10 +02:00
SomberNight
1a08063928 config: remove 'open_last_wallet' side-effecting
related: #5629
2019-09-10 17:10:52 +02:00
ThomasV
54257cbcca Rewrite JsonRPC requests using asyncio.
- commands are async
 - the asyncio loop is started and stopped from the main script
 - the daemon's main loop runs in the main thread
 - use jsonrpcserver and jsonrpcclient instead of jsonrpclib
2019-08-20 09:03:12 +02:00
SomberNight
80c52d4808 simple_config.estimate_fee: make sure method never fails
code in lnsweep was already assuming this
2019-08-20 09:03:12 +02:00
ThomasV
81d340b19c lnworker: do not create sweep transactions before outputs can be redeemed 2019-08-20 09:03:11 +02:00
ThomasV
7be4cdaf18 redeem htlcs:
- fix bug in lnsweep: lnwatcher transactions were indexed by prev_txid
 - add test for breach remedy with unsettled htlcs
 - add timeout option to lnpay, and replace DO_NOT_SETTLE with SETTLE_DELAY
   so that we can read intermediate commitment tx in regtest
2019-08-20 09:03:11 +02:00
Janus
8fc1779b0d ln: add test_lnwatcher 2019-08-20 09:03:11 +02:00
SomberNight
4b37343c62 unify hardcoded regtest fee 2019-08-20 09:03:10 +02:00
ThomasV
095de2dd22 make on_update_add_htlc async 2019-08-20 09:03:10 +02:00
SomberNight
15a6a83107 ln onchain fees: use 2 block ETAs with 150 s/b fallback 2019-08-20 09:03:10 +02:00
SomberNight
cb69aa80f7 coinchooser: don't spend buckets with negative effective value
Calculate the effective value of buckets, and filter <0 out.
Note that the filtering is done on the buckets, not per-coin.
This should better preserve the user's privacy in certain cases.

When the user "sends Max", as before, all UTXOs are selected,
even if they are not economical to spend.

see #5433
2019-06-20 22:42:50 +02:00
SomberNight
3385a94753 logging: basics 2019-05-02 15:19:03 +02:00
SomberNight
2f11216986 fix get_fee_text for static fees
mismatching units
probably only affects kivy gui; when using static fees
2019-02-18 17:52:50 +01:00
SomberNight
6958c0ccc3 config: reject non-json-serialisable writes
see #4788
2018-10-21 14:58:55 +02:00