1
0
Commit Graph

14008 Commits

Author SHA1 Message Date
SomberNight
99836d5e5f kivy: confirm_tx_dialog: toggling "final" should update the tx
We create a tx when the dialog is created, and re-create it every time
the user moves the fee slider. However, we were not re-creating it if
the user toggles the "Final" checkbox, meaning its value was only taken
into account if the user moved the fee slider after setting the checkbox.

fixes https://github.com/spesmilo/electrum/issues/7547
2021-10-29 14:27:13 +02:00
ghost43
5787f3ab74 Merge pull request #7542 from bitromortac/2109-dust-limit
Implement recent spec changes regarding collab channel close outputs
2021-10-27 16:51:07 +02:00
SomberNight
cb55a2d654 tests: try to reduce flakyness of test_fail_pending_htlcs_on_shutdown
Alice sends and HTLC: Alice->Carol->Dave
we need a lot of messages back and forth to happen:
- Alice adds HTLC to chan_AC, sends sig, Carol revacks, sends sig, Alice revacks;
- only then Carol adds HTLC to chan_CD, sends sig, Dave revacks, sends sig, Carol revacks
on CI, 0.5 seconds is often not enough for this it seems.
2021-10-27 16:46:15 +02:00
bitromortac
e97f350597 add comment for safer forwarding 2021-10-27 16:27:16 +02:00
bitromortac
947693c90d check dust limits
* on channel opening we verify that the peer's dust limit is above 354
  sat, the limit for unknown segwit versions
* we constrain the allowed scriptpubkey types for channel closing
* we check that the remote's output is above the relay dust limit for
  the collaborative close case
2021-10-27 16:27:15 +02:00
bitromortac
f2f8c4533b implement option_shutdown_anysegwit
https://github.com/lightningnetwork/lightning-rfc/pull/672

We check the received shutdown script against higher segwit versions and
accept closing to that script if option_shutdown_anysegwit has been
negotiated.
2021-10-26 14:51:09 +02:00
SomberNight
5c91212fab dns hacks: dns via proxy: special-case "localhost" string
fix https://github.com/spesmilo/electrum/issues/7546
2021-10-25 17:46:51 +02: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
4af103378a lnpeer: refactor some checks re open_channel/accept_channel 2021-09-28 19:48:27 +02:00
ghost43
437a9e4358 Merge pull request #7505 from bitromortac/2109-activate-watchtower
watchtower: continuously check for added channels
2021-09-28 16:46:19 +02:00
SomberNight
b9295eda09 ci: only run coveralls script if ENV var is set (for token)
As the token is typically not available for pull requests.
2021-09-28 16:30:41 +02:00
bitromortac
ff61020dd2 watchtower: watch new channels 2021-09-27 10:31:44 +02:00
ThomasV
baff4fa625 save_backup: do not remove deterministic LN key (see #7513) 2021-09-26 12:18:25 +02:00
ThomasV
b431d8e9b8 follow-up eadd1bebb2 2021-09-24 17:36:33 +02:00
SomberNight
ca2d1eea45 build appimage: update appimagetool and stop using fork of mksquashfs
The latest release of appimagetool bundles a new enough version of
mksquashfs. We had been building a fork of mksquashfs but all the
relevant patches there had been upstreamed.

Note: we still need a wrapper when calling mksquashfs, as appimagetool
calls it with "-mkfs-time 0" and we have the SOURCE_DATE_EPOCH env var
set; and these two would conflict.
Two ways to fix: either unset SOURCE_DATE_EPOCH for that context, or
build a wrapper that removes the "-mkfs-time 0". The former would be
cleaner but for some reason I did not manage to build reproducibly
that way. The latter seems to work.

related:
- https://github.com/AppImage/AppImageKit/issues/929#issuecomment-580769875
  > Now official squashfs 4.4 makes reproducible images by default
- https://github.com/AppImage/AppImageKit/pull/996
2021-09-23 18:49:44 +02:00
ghost43
a555eb3106 Merge pull request #7504 from bitromortac/2109-sample-from-list
Python3.9 compat: sample from list
2021-09-22 15:24:58 +02:00
bitromortac
8913abdf9a python3.9: sample from list instead of set
electrum/electrum/channel_db.py:357: DeprecationWarning: Sampling from a
set deprecated since Python 3.9 and will be removed in a subsequent version.
2021-09-22 14:50:32 +02:00
SomberNight
11146d352f appimage build: bump python 3.8.12->3.9.7 2021-09-20 19:31:41 +02:00
SomberNight
fb3ce438d6 appimage build: bump python 3.7.10->3.8.12 2021-09-20 19:31:38 +02:00
SomberNight
5d0aa63adb appimage build: change base to ubuntu 18.04
ubuntu 16.04 is EOL
2021-09-20 19:31:33 +02:00
ThomasV
d570002b83 Merge pull request #7502 from spesmilo/no_convert_key
No convert key
2021-09-20 17:04:09 +02:00
ThomasV
eadd1bebb2 Do not convert StoredDict keys to str.
Instead, convert json keys to int when storage is read.
2021-09-20 14:49:59 +02:00
ThomasV
7a0904c0f4 wallet update: move fields that have string keys out of channel log 2021-09-20 14:47:20 +02:00
SomberNight
1188187431 wallet_db upgrade: in OnchainInvoice['outputs'], convert vals None->0
should fix https://github.com/spesmilo/electrum/issues/7500
2021-09-19 17:35:49 +02:00
SomberNight
b7cdf3fe11 wallet_db upgrades: (trivial) make upgrades more standalone
and robust to code changes
2021-09-19 17:32:25 +02:00
SomberNight
0b05edc705 wallet payreqs: trivial clean-up 2021-09-19 17:25:57 +02:00
SomberNight
433c6762c9 Qt Send tab: handle exc when "." is entered into amount_e
To reproduce: enter "." to amount_e in Send tab; then click "Save".

Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/gui/qt/main_window.py", line 1638, in do_save_invoice
    self.pending_invoice = self.read_invoice()
  File "/home/user/wspace/electrum/electrum/gui/qt/main_window.py", line 1625, in read_invoice
    outputs = self.read_outputs()
  File "/home/user/wspace/electrum/electrum/gui/qt/main_window.py", line 1501, in read_outputs
    outputs = self.payto_e.get_outputs(self.max_button.isChecked())
  File "/home/user/wspace/electrum/electrum/gui/qt/paytoedit.py", line 235, in get_outputs
    self.outputs = [PartialTxOutput(scriptpubkey=self.payto_scriptpubkey, value=amount)]
  File "/home/user/wspace/electrum/electrum/transaction.py", line 1533, in __init__
    TxOutput.__init__(self, *args, **kwargs)
  File "/home/user/wspace/electrum/electrum/transaction.py", line 113, in __init__
    raise ValueError(f"bad txout value: {value!r}")
ValueError: bad txout value: None
2021-09-19 16:53:58 +02:00
SomberNight
be084dd44b qt wallet info: make labels selectable 2021-09-16 09:13:44 +02:00
SomberNight
4293d6eca0 kivy: settings: better handling of "default" language 2021-09-15 19:52:40 +02:00
SomberNight
7cb11ceda4 kivy: locale: set default language based to OS lang
On Android, the default language is now set to the language of the OS,
instead of English.

related https://github.com/spesmilo/electrum/issues/4618
related https://github.com/spesmilo/electrum/issues/7494
2021-09-15 19:51:10 +02:00
SomberNight
22bb52d5df kivy: locale: also translate strings in core lib 2021-09-15 19:45:06 +02:00
SomberNight
fb6beb3e5c ci: remove Travis CI integration
we are now using Cirrus CI
2021-09-15 17:50:01 +02:00
SomberNight
3f69e5ae3e qt cpfp: (trivial) make some strings translatable
gettext was not picking these up
2021-09-15 17:37:22 +02:00
djboi
679bd21bac Added CPFP Feature for Kivy GUI (#7487)
implements https://github.com/spesmilo/electrum/issues/5507
2021-09-15 15:32:24 +00:00
SomberNight
85780eea1a multiple max spends: add unit test
re https://github.com/spesmilo/electrum/pull/7492
2021-09-15 16:42:32 +02:00
SomberNight
acbb363240 follow-up prev: some clean-ups
re https://github.com/spesmilo/electrum/pull/7492
2021-09-15 16:41:41 +02:00
Siddhant Chawla
65c3a892cf Multiple max spends functionality added (#7492)
this implements https://github.com/spesmilo/electrum/issues/7054
2021-09-15 14:35:15 +00:00
SomberNight
8b9296654e contrib/push_locale: start using crowdin v2 API (instead of v1)
-----

closes https://github.com/spesmilo/electrum/issues/6936

Note: if we used the python crowdin client (https://github.com/crowdin/crowdin-api-client-python),
we would do something like this:

```
from crowdin_api import CrowdinClient
class MyCrowdinClient(CrowdinClient):
    TOKEN = ...
client = MyCrowdinClient()
with open(locale_file_name, 'rb') as f:
    resp = client.storages.add_storage(f)
    storage_id = resp['data']['id']
client.source_files.update_file(projectId=crowdin_project_id, storageId=storage_id, fileId=crowdin_file_id)
client.translations.build_crowdin_project_translation(projectId=crowdin_project_id)
```
2021-09-14 20:17:10 +02:00
SomberNight
70d901b544 cirrus ci: push_locale: make sure gettext is installed 2021-09-14 20:10:32 +02:00
SomberNight
8ef2052a62 ci: coveralls: try to aggregate tasks/jobs into builds
see https://github.com/lemurheavy/coveralls-public/issues/1558
see https://github.com/cirruslabs/cirrus-ci-docs/issues/118#issuecomment-717680614
2021-09-13 20:22:58 +02:00
SomberNight
f5d1d6f97e readme: update CI badge from travis to cirrus ci 2021-09-13 20:01:26 +02:00
SomberNight
03547ac182 ci: fix coveralls for cirrus ci 2021-09-13 19:51:56 +02:00
JeremyRand
b1c4bb8914 Add Cirrus CI (#7431)
* Cirrus: Add Tox task

* Cirrus: Add Locale task

* Cirrus: Add Flake8 Task

* Cirrus: Add Regtest task

* Regtest: Flush stdout

Allows viewing output sooner.

* Regtest: Read process.stdout in text mode

Improves ability to quickly see output.

* Cirrus: Add Windows task

* Cirrus: Add Android task

* Cirrus: Add macOS task

* Cirrus: Add AppImage task

* Cirrus: Add tarball task

* Cirrus: Add Submodules task

* Android: remove superfluous cp/rm

* Add .dockerignore

Symlink to .gitignore.
2021-09-13 16:20:54 +00:00
ThomasV
846a3f8397 Merge pull request #7493 from kiocosta/patch-1
Removes inaccurate "brasilian" language
2021-09-13 12:48:04 +02:00
Bradley Ray
90e906aba2 Update new password prompt (#7495)
No longer prompts for new password if --new_password parameter is used
2021-09-10 23:19:06 +00:00
Caio Costa
397e43373f Removes inaccurate "brasilian" language
The option "brasilian" is inaccurate since we brazilians do speak Portuguese.
We don't consider "brasilian" as a language, so I believe this change I've made is a more accurate option for this public.
2021-09-09 22:32:51 -03:00
SomberNight
bf6400ae30 kivy: fix when running with --offline 2021-09-09 17:40:21 +02:00
SomberNight
67f14cdfa8 follow-up prev: some clean-up and added clarifications
re https://github.com/spesmilo/electrum/pull/7464
2021-09-09 17:22:37 +02:00
Siddhant Chawla
3a583885d9 Add network setup option when Kivy GUI starts for the First time. (#7464)
Offer a first-start network setup screen when using the kivy GUI,
similar to what is already done in Qt.
2021-09-09 15:18:19 +00:00
SomberNight
07bd2fe97d network.py: reorder bitcoin core error msg whitelist
test policy.cpp strings last as some of them are short and too generic

fixes https://github.com/spesmilo/electrum/issues/7483
2021-09-08 18:18:08 +02:00