Janus
2323118bda
lnchan: only sign force_close_tx when demanded, assure consistency, fix test
6 years ago
Janus
1d8fe52fa3
lnchan: make force_close_tx() assure that tx is valid, trigger failure in test
6 years ago
ThomasV
fde9f91902
lnchannel: store pre-signed sweep transactions after each new commitment
6 years ago
ThomasV
729ddb8ec3
LNWatcher refactoring:
...
- do not store non-breach transactions
- send 'channel_open' and 'channel_closed' events
- force-closed channels are handled by LNWorker
6 years ago
ThomasV
1b7a3c25d1
lnsweep: return ctx.txid instead of None
6 years ago
ThomasV
3aa36c1502
Channel: add current_commitment method
6 years ago
Janus
47c07f77b4
lnsweep: fix create_sweeptxs_for_their_just_revoked_ctx
...
in the case where an htlc is failed, it could happen
that we use the wrong list of htlcs to generate sweep
tx'es. we would use the pending list instead of the
committed list.
observed by sending 12300sat and then 123000sat,
the second payment fails and an AssertionError was
triggered cause the htlc output could not be found
in the ctx.
added some documentation to clarify the behaviour
of lnchan.included_htlcs.
6 years ago
ThomasV
c0a1af2032
fix channel closure:
...
- add 'CLOSING' state
- wait until channel has no inflight HTLC
- end fee negocitation when both parties agree on the fee
(previously code ended it only when the other party had broadcast)
- broadcast the closing transaction
6 years ago
ThomasV
5bc74772a2
follow up 'replace properties with functions'
6 years ago
SomberNight
dbc4549c0e
lnchan: restore process_new_offchain_ctx
6 years ago
SomberNight
595cfcbb65
move sweeping methods from lnchan.py to new file
...
also sweep "received" htlcs from "our" ctx
also sweep htlcs from their ctx (non-breach)
extract ctn; included_htlcs_in_their_latest_ctxs
6 years ago
ThomasV
78896897cb
lnchan: replace properties with functions
6 years ago
Janus
e3409d32ef
channel details with list of htlcs
6 years ago
ThomasV
3430d1aaa3
follow-up prev commit
6 years ago
ThomasV
5422de90a2
lightning: do not handle more than one fee update at a time
6 years ago
Janus
1520338f37
fix ln tests
6 years ago
Janus
1425628604
add command for listing invoices and their progress, fix list_channels
6 years ago
Janus
783cac1f23
function that returns map from commitment number to list of HTLCs
6 years ago
Janus
c570bc5fb1
avoid leaving FORCE_CLOSING state, rebroadcast closing tx if reorged out
6 years ago
Janus
39fa13b938
lnchan: use NamedTuple for logs instead of dict with static keys (adds, locked_in, settles, fails)
6 years ago
Janus
72187a4341
lnchan: make sign_next_commitment revert state
6 years ago
Janus
001bb4ca09
remove incorrect docstrings, attribute docstring sources where applicable
6 years ago
SomberNight
c0ae7b5534
after rebase clean-up
6 years ago
SomberNight
ce2b572fa5
lnbase: more type annotations, and minor fix
6 years ago
Janus
f5201327d1
add lnd copyright boilerplate to lnchan, test_lnchan
6 years ago
Janus
a42c1067ab
lnworker: fix listchannels
6 years ago
Janus
a5a7c1406e
lightning channels reserves: use pretty balance in Qt, fix bugs, add tests
6 years ago
ThomasV
eb4e6b2e54
use WaitingDialog to close channels
6 years ago
Janus
15b0720f5e
lightning channel reserves
6 years ago
Janus
0dfc9e512b
fix co-op close
6 years ago
SomberNight
04ec7e9968
lnutil.make_funding_input: don't return payment pubkeys
...
order depends on who is initiator anyway
6 years ago
Janus
1f97a9753e
redeem htlc outputs of our local commitment transaction back to wallet
6 years ago
SomberNight
f70e679aba
some more type annotations that needed conditional imports
6 years ago
SomberNight
f3d1f71e94
lnchan: set diagnostic_name
...
previously was only set for tests
6 years ago
SomberNight
d511ecdc00
start failing htlcs
6 years ago
Janus
ac68c8f531
lnchan: add available_to_spend()
6 years ago
Janus
d317bdbd9b
lnchan: make function for onion_keys decoding/encoding
6 years ago
Janus
eabe23f6b8
make function for determining who pays fee
6 years ago
SomberNight
cd175f0949
fix prev
6 years ago
ThomasV
9a59ffaf44
lnrouter: filter out unsuitable channels
6 years ago
ThomasV
87fb0da5e1
minor fix
6 years ago
ThomasV
e761f5b876
add watchtower class, send encumbered tx as json
6 years ago
Janus
94a10e6307
rebase fixup: use new broadcast_transaction API
6 years ago
Janus
1763d02b05
rename lnhtlc->lnchan, HTLCStateMachine->Channel
6 years ago
Janus
b26dc66567
lnhtlc: only store feerate once, don't store heights since we do not roll back
6 years ago
Janus
e8471e483b
lnhtlc: merge config and state, remove unnecessary properties
6 years ago
Janus
1d4c113a35
lnhtlc: remove lookup_htlc, use heterogeneously typed lists
6 years ago
Janus
699368b0b7
lnhtlc: save settled htlc amounts separately
6 years ago
SomberNight
029ec5a5ab
make our channels private, and put routing hints in invoices we create
6 years ago
ThomasV
242ab5ae56
lightning: fix tests
6 years ago