SomberNight
914eb9989d
wallet: minor clean-up of tx.set_rbf() calls
Better to always call it, to make sure inputs have identical sequence numbers.
4 years ago
SomberNight
ca86e35724
wallet.bump_fee: (fix) make sure all inputs have same sequence number
Previously, if bump_fee decided to add new inputs to the tx, they would
have a different sequence number than the existing inputs. This was
unintentional.
4 years ago
SomberNight
b56fe237cd
ledger: give clear error that old HW.1 cannot send to bech32 address
maybe related #7022
4 years ago
ThomasV
87a080d30e
split code in htlc_switch:
- raise OnionRoutingFailure whenever we want to fail a htlc
- catch that exception in htlc_switch
- this will avoid code duplication in the case of trampoline
4 years ago
SomberNight
fa1762792a
lntransport: CancelledError needs priority over LPConnClosed
Scenario (prior this change):
A task in lnpeer.Peer.taskgroup raises ORIG_EXC, e.g. in htlc_switch.
The taskgroup then cancels all its tasks and then awaits each (in cancel_remaining):
4e64c56042/aiorpcx/curio.py (L217-L221)
In Peer.main_loop, we would want ORIG_EXC to be raised,
but instead LightningPeerConnectionClosed() will be raised as
the Peer._message_loop() task is cancelled, and it is awaited first in cancel_remaining.
We should make sure that if a task is cancelled it will let the CancelledError
propagate out, or at least it does not raise a different exception instead.
4 years ago
ThomasV
2057185aa4
Merge pull request #7011 from zebra-lucky/make_payreq_details_network
make_unsigned_request: set network for testnet
4 years ago
zebra-lucky
c43729b076
make_unsigned_request: set network for testnet
4 years ago
ThomasV
42c10c2fec
Separate pay_to_node logic from pay_invoice:
- pay_to_node will be needed to forward trampoline onions.
- pay_to_node either is successful or raises
- pay_invoice handles invoice status
4 years ago
ThomasV
2c2d3f3b30
handle_error_from_failed_htlc: blacklist channel if cannot decode payload
4 years ago
ThomasV
4febbcdc2d
encapsulate get_routing_info in lnaddr
4 years ago
ThomasV
0c93394513
rename lnworker._pay to pay_invoice, call it directly from GUIs
4 years ago
Gordan Nekić
9c4807644b
Fix ledger sign message ( #7004 )
there was an around ~1/128 chance of creating an invalid signature when signing a message with a ledger
4 years ago
bitromortac
2bffc9d3eb
lnpeer: fix timed out mpp
4 years ago
ThomasV
c01ca101e0
minor: fix typo
4 years ago
ThomasV
34734bd229
cleanup, follow-up f28a2aae73
4 years ago
ThomasV
cc69cf3f33
Qt: fix deprecation warning
4 years ago
ThomasV
f28a2aae73
Reorganize code so that we can send Multi Part Payments:
- LNWorker is notified about htlc events and creates payment events.
- LNWorker._pay is a while loop that calls create_routes_from_invoice.
- create_route_from_invoices should decide whether to split the payment,
using graph knowledge and feedback from previous attempts (not in this commit)
- data structures for payment logs are simplified into a single type, HtlcLog
4 years ago
ThomasV
1102ea50e8
fix tests (follow-up previous commit)
4 years ago
ThomasV
ff8fc798f4
follow-up c0bf9b4509
4 years ago
ThomasV
ef5a265449
basic_mpp: receive multi-part payments
4 years ago
ThomasV
c0bf9b4509
LNWorker: do not save PR_INFLIGHT status, detect it on startup instead
4 years ago
ThomasV
51455c9d9a
Merge pull request #6993 from zebra-lucky/pr_check_network
paymentrequest: check network on PaymentRequest parse
4 years ago
zebra-lucky
d53d4e46e6
paymentrequest: check network on PaymentRequest parse
4 years ago
rage-proof
cb3977798c
add function to determine script-type for all inputs in a psbt ( #6984 )
* Add functions to determine the script type from a psbt.
* add a function inside PartialTransaction
* P2wsh uses the witness-script field to save the script.
* Limit the detection of script-types that are not multisig.
4 years ago
SomberNight
d34b8d69f6
build-wine/README.md: add comment about needing recent docker version
related:
https://github.com/spesmilo/electrum/issues/6971
https://github.com/spesmilo/electrum/pull/6981
4 years ago
Jin Eguchi
5d19d5d4bd
Fix windows build(travis) ( #6981 )
4 years ago
SomberNight
337d4890a1
lnworker/swaps: add '_sat' suffix to arg names and force kwargs
4 years ago
SomberNight
3d1796ab1d
follow-up prev: fix units when calling lnworker.create_invoice: msat/sat
follow-up e477a43385
4 years ago
ThomasV
e477a43385
PaymentInfo: use msat precision
4 years ago
SomberNight
1fb0c28d0a
exchange_rate: (fix) rm need to restart app to disable FX rates
Previously if the user disabled FX rates in the settings, the UI
would keep showing the fiat amounts everywhere until the next time
the program was started. (and the rates would not even refresh anymore)
4 years ago
SomberNight
1a629d88e7
windows binaries: bump wine version
related: #6971
4 years ago
SomberNight
27cd078001
wallet: auto-freeze small unconfirmed UTXOs
see #6960
4 years ago
SomberNight
2b0f156ce8
lnpeer.htlc_switch: (bugfix) don't fulfill htlc until add is irrevocable
This makes the test added in prev commit pass.
4 years ago
SomberNight
e8a2fa5596
tests: lnpeer.htlc_switch: don't fulfill htlc until add is irrevocable
This adds a failing test, where the HTLC switch fulfills an HTLC too soon,
before the corresponding 'update_add_htlc' is irrevocably committed.
4 years ago
ThomasV
521376f87f
rm unused parameter in maybe_fulfill_htlc
4 years ago
ThomasV
fe1b2149cb
lnpeer: fix flen in INIT
4 years ago
SomberNight
1d9311aeef
qt network dialog: show protocol (if ":t") for servers in NodesList
4 years ago
SomberNight
d13995309a
qt main_window: add error handling to show_bitcoin_paper
related: #6970
4 years ago
SomberNight
338adf05ba
interface.get_transaction: stricter sanitisation
in particular, Transaction.__init__ allows leading/trailing whitespaces
4 years ago
SomberNight
7294613447
util.is_hex_str: forbid whitespaces
4 years ago
ThomasV
176a1162b4
Merge pull request #6972 from wakiyamap/patch-2
Fix error of showing bitcoin paper(testnet)
4 years ago
Jin Eguchi
f548b63563
Fix error of showing bitcoin paper(testnet)
4 years ago
ThomasV
d7515b936e
Qt: download and show bitcoin whitepaper. fixes #6970
4 years ago
ThomasV
d6e293052a
Qt: set need_update on payment received (minor fix)
4 years ago
ThomasV
8a656d648b
kivy: disable gossip button is channel_db is None
4 years ago
ThomasV
986de70529
Qt: fix invoices refresh (follow-up 94708f63e4
)
4 years ago
ThomasV
895f9daded
add 'view log' action for LN payments in tx history
4 years ago
ThomasV
d4ab4b37b7
Merge pull request #6965 from SomberNight/202101_custom_block_explorer
qt block explorer: allow custom URL
4 years ago
SomberNight
1abecf25c9
qt block explorer: allow custom URL
The QTextEdit expects values such as (one per line):
```
https://blockstream.info/testnet/
https://192.168.0.38:3021/
("https://blockstream.info/testnet/ ", {'tx': 'tx/', 'addr': 'address/'})
```
closes #4831
4 years ago
SomberNight
bc6f2926f4
commands: add 'freeze_utxo' cmd; to expose this to CLI/RPC
4 years ago