1
0
Commit Graph

18341 Commits

Author SHA1 Message Date
ThomasV
77c180f793 lnutil: add htlc witness_script templates for anchors
extracted from https://github.com/spesmilo/electrum/pull/9628
2025-03-12 16:41:45 +00:00
ThomasV
9d0cc6c4a3 follow-up c7dcfab 2025-03-11 18:16:41 +01:00
SomberNight
3f327eea07 wallet: fix wallet.make_unsigned_transaction method signature
- "fee_policy" arg is actually mandatory
- and fix test/stdio guis following fee_policy/config split

follow-up 840243e029
2025-03-11 16:15:17 +00:00
SomberNight
7343d69ed7 qt/fee_slider: add type hints, small API change, qt parenting 2025-03-11 15:45:26 +00:00
SomberNight
163f59f83f qt/main_window: fix regression in confirm_tx_dialog
follow-up 605b511b43
2025-03-11 15:22:14 +00:00
SomberNight
75d800a4ea gui: move reused text to messages.py 2025-03-11 15:08:45 +00:00
ThomasV
c7dcfab3fc lnwatcher: remove unused class ListenerItem 2025-03-11 13:31:49 +01:00
ThomasV
c42201ccac remove lnworker.enable_htlc_settle_onchain: not used
I think this has only been used for manual testing
2025-03-11 12:12:43 +01:00
Sander van Grieken
083b32be3b qt,qml: more regression fixes 2025-03-10 19:42:37 +01:00
Sander van Grieken
f917234acc qml: more regression fixes w.r.t 840243e029 2025-03-10 17:38:21 +01:00
Sander van Grieken
a00cf35fd0 qml: fix regression 840243e029 2025-03-10 16:31:28 +01:00
SomberNight
0d120145d5 tests/regtest.py: trivial clean-up
from dde7fd09ac
2025-03-10 14:54:50 +00:00
ThomasV
707d87a0d4 Revert "regtests: in py ctx, refer to configvars directly, not as str literals"
This reverts commit dde7fd09ac.
2025-03-10 12:01:41 +01:00
f321x
2290650faa pass proxy settings to aionostr Manager
rebase on master
2025-03-10 10:57:30 +01:00
Sander van Grieken
7030f3de18 qml: followup d005da1ea2 2025-03-09 14:55:00 +01:00
Sander van Grieken
6fdb6c93f7 refactor lnworker.pay_invoice to accept Invoice object instead of bolt11 string
rename lnworker._check_invoice to lnworker._check_bolt11_invoice
2025-03-09 14:47:34 +01:00
accumulator
4d4453821a Merge pull request #9618 from accumulator/cleanup_lnutil
lnutil: imports, whitespace, remove unused code
2025-03-09 13:02:30 +01:00
Sander van Grieken
6331ac0f85 lnutil: imports, whitespace, remove unused code 2025-03-09 12:30:02 +01:00
accumulator
eb98b1d0df Merge pull request #9613 from SomberNight/202503_regtest_configvars
regtests: in py ctx, refer to configvars directly, not as str literals
2025-03-09 10:34:25 +01:00
SomberNight
dde7fd09ac regtests: in py ctx, refer to configvars directly, not as str literals
though in the bash script, we cannot do this
2025-03-07 17:26:12 +00:00
SomberNight
a7c634b1ab regtests: extend "extract_preimage" to cover both types of extracts 2025-03-07 17:06:55 +00:00
SomberNight
c146321924 regtests: e-x: update COIN name
ref ca59151d73
2025-03-07 15:40:12 +00:00
SomberNight
6ea6c80f21 regtests: split up long line on e-x invocation 2025-03-07 15:40:05 +00:00
ThomasV
764cc78386 Merge pull request #9590 from f321x/jit-update-unfunded-state
Handle unfunded zeroconf channels in update_unfunded_state
2025-03-07 13:55:55 +01:00
f321x
6fd833ccfb add handling of zeroconf channels to update_unfunded_state 2025-03-07 13:53:01 +01:00
ThomasV
8011ae00ab Merge pull request #9586 from f321x/jit-block-preimage
Add mechanism to block htlcs from settling back
2025-03-07 12:04:39 +01:00
f321x
109ad2b3da add mechanism to block htlcs from settling back 2025-03-07 12:03:59 +01:00
ThomasV
4641c913c7 lnwatcher: remove unneeded for ... else construct
(backport from batch_payment_manager branch)
2025-03-07 10:44:58 +01:00
ghost43
32b0e62cdc Merge pull request #9608 from SomberNight/202503_asyncio_gc
asyncio: hold our own strong refs for tasks and futures
2025-03-06 16:07:55 +00:00
ThomasV
d5ee678b7f if a network object is there but fee estimates are not available,
raise NoDynamicFeeEstimates in FeePolicy rather than in wallet.

Also, show an error message in Qt
2025-03-06 13:13:01 +01:00
Sander van Grieken
7d8a5cc259 qml: improve QEAmount comments, convert to docstring. 2025-03-06 10:56:28 +01:00
ThomasV
074ede8f12 make_unsigned_transaction: pass merge_duplicate_outputs as
a parameter, because it must not be used in some contexts
(e.g. tx batcher).

This makes config.MERGE_DUPLICATE_OUTPUTS a GUI option
2025-03-06 09:22:12 +01:00
SomberNight
0b3a283586 asyncio: hold our own strong refs for tasks and futures
see https://docs.python.org/3.13/library/asyncio-task.html#asyncio.create_task :

> Important
>
> Save a reference to the result of this function, to avoid a task
> disappearing mid-execution. The event loop only keeps weak references
> to tasks. A task that isn’t referenced elsewhere may get garbage
> collected at any time, even before it’s done. For reliable
> “fire-and-forget” background tasks, gather them in a collection

ref https://github.com/python/cpython/issues/91887
ref https://github.com/beeware/toga/pull/2814
2025-03-05 17:06:04 +00:00
SomberNight
b88d9f9d06 network: follow-up ProxySettings. make sure probe_tor cleans-up.
follow-up 2aa427b4bf
2025-03-05 17:04:49 +00:00
ThomasV
943f6436c7 make_unsigned_transaction: make some parameters non-optional 2025-03-05 16:10:27 +01:00
SomberNight
2aa427b4bf Merge branch 'pr/9507': qt: refactor NetworkChoiceLayout to ProxyWidget+ServerWidget
ref https://github.com/spesmilo/electrum/pull/9507
2025-03-05 15:01:05 +00:00
SomberNight
5dc2ae243e util: refactor Tor-detection to be async
- on my PC, with Tor Browser running (socks proxy on port 9150), detect_tor_socks_proxy took ~4.01 seconds
- this was because we probed port 9050, 2 sec timeout, 9051, 2 sec timeout, 9150, ~few ms to succeed
- instead we now probe all ports concurrently
2025-03-05 14:46:47 +00:00
ThomasV
ab14c3e138 tx batching in GUI:
- discard config.WALLET_BATCH_RBF
 - allow the user to choose base_tx from a list of batching
   candidates in ConfirmTxDialog
2025-03-05 14:07:02 +01:00
ThomasV
3b369abf16 make_unsigned_transaction:
- use base_tx.remove_signatures(), because it also blanks script_sig
 - do not use config.WALLET_SEND_CHANGE_TO_LIGHTNING, as this is
   passed as a parameter.
2025-03-05 14:05:41 +01:00
ThomasV
d97ce7ed73 minor fix, follow-up #9597 2025-03-05 11:31:35 +01:00
Sander van Grieken
f1e9abf04e qt,qml: review rework, refactor spinner, add tor probe active indicator 2025-03-05 10:52:25 +01:00
ThomasV
580457aa58 Merge pull request #9597 from spesmilo/fee_policies
separate fee policy from config
2025-03-05 10:44:42 +01:00
ThomasV
840243e029 separate fee policy from config
- Wallet.make_unsigned_transaction takes a FeePolicy parameter
 - fee sliders act on a FeePolicy instead of config
 - different fee policies may be used for different purposes
 - do not detect dust outputs in lnsweep, delegate that to lnwatcher
2025-03-05 10:29:26 +01:00
ThomasV
6234cbf97b Merge pull request #9603 from spesmilo/gossip_info
gossip: less log lines, use command line instead
2025-03-05 08:23:19 +01:00
ghost43
2cae6bb0ab Merge pull request #9604 from SomberNight/202503_ci_py313
tests: run debug-mode unittests on python 3.13
2025-03-04 16:10:09 +00:00
ghost43
718a5137dd Merge pull request #9588 from f321x/jit-accept-non-recoverable
Refector on_channel_open to accept incoming channels if the source is a trusted zeroconf node
2025-03-04 16:06:55 +00:00
f321x
cb56f0873d improve ChannelType option check 2025-03-04 17:03:55 +01:00
SomberNight
f13983015d tests: run debug-mode unittests on python 3.13 2025-03-04 15:50:36 +00:00
SomberNight
ffc84ab7d3 tests: fix warning in test_lntransport.py::TestLNTransport::test_loop
$ python3 -X dev -m pytest tests/test_lntransport.py

```
=============================== warnings summary ===============================
tests/test_lntransport.py::TestLNTransport::test_loop
  /usr/local/lib/python3.11/asyncio/streams.py:414: ResourceWarning: unclosed <StreamWriter transport=<_SelectorSocketTransport closing fd=15 read=idle write=<idle, bufsize=0>> reader=<StreamReader transport=<_SelectorSocketTransport closing fd=15 read=idle write=<idle, bufsize=0>>>>
    warnings.warn(f"unclosed {self!r}", ResourceWarning)
```
2025-03-04 15:49:22 +00:00
ThomasV
1201b87ad7 Merge pull request #9587 from f321x/jit-invoice-creation
Disable mpp flags in invoice creation if jit channel is required and consider available liquidity
2025-03-04 16:07:54 +01:00