SomberNight
13d6997355
LNPeerAddr: validate arguments
...
no longer subclassing NamedTuple (as it is difficult to do validation then...)
2019-11-26 00:15:33 +01:00
SomberNight
edba59ef54
LNPeerAddr: nicer str formatting for IPv6 hosts
2019-11-25 21:10:53 +01:00
SomberNight
cd9477c0da
ln: qt channel open: fix max channel size
2019-11-20 17:45:28 +01:00
ThomasV
47e0b4cd02
fix #5765
2019-11-18 05:12:13 +01:00
ThomasV
78813dcb7d
Pass make_tx function to ConfirmTxDialog
...
- allow 'spend max' when opening a channel (fixes #5698 )
- display amount minus fee when 'max' buttons are pressed
- estimate fee of channel funding using a template with dummy address
2019-11-14 10:20:19 +01:00
SomberNight
7b18c91b74
psbt follow-up: fix ln cooperative close, and minor type clean up
2019-11-07 18:28:27 +01:00
SomberNight
bafe8a2fff
integrate PSBT support natively. WIP
2019-11-04 22:24:36 +01:00
SomberNight
befa8ea771
transaction: kill "name", "csv_delay", "cltv_expiry" fields
2019-09-09 19:38:35 +02:00
SomberNight
83fcdbd561
lnchannel: handle htlc-address collisions
...
We were previously generating an incorrect commitment_signed msg if there were
multiple htlcs sharing the same scriptPubKey.
2019-09-07 08:54:41 +02:00
SomberNight
d4da4aa56c
lnrouter: fix off-by-one in NUM_MAX_EDGES_IN_PAYMENT_PATH
2019-09-06 18:36:21 +02:00
SomberNight
509df9ddaf
create class for ShortChannelID and use it
2019-09-06 18:09:05 +02:00
SomberNight
beeb81e179
lnpeer: use correct failure codes in _maybe_forward_htlc
2019-08-20 09:03:12 +02:00
SomberNight
0973b86925
lnworker: rework "is_dangerous"
...
"Should channel be closed due to expiring htlcs?"
2019-08-20 09:03:12 +02:00
SomberNight
940fc86749
lnpeer: reestablish_channel - fix data_loss_protect edge case
2019-08-20 09:03:12 +02:00
SomberNight
107f271e58
move all ctn book-keeping to lnhtlc (from lnchannel)
2019-08-20 09:03:12 +02:00
SomberNight
44761972cb
lnchannel: ctx output-ordering: identical htlcs are ordered by CLTV
2019-08-20 09:03:12 +02:00
SomberNight
b1f606eaed
lnchannel: start using "latest" and "next" instead of "current" and "pending"
...
"current" used to be "oldest_unrevoked"; and pending was "oldest_unrevoked + 1"
but this was very confusing...
so now we have "oldest_unrevoked", "latest", and "next"
where "next" is "latest + 1"
"oldest_unrevoked" and "latest" are either the same or are offset by 1
(but caller should know which one they need)
rm "got_sig_for_next" - it was a redundant sanity check, that really
just complicated things
rm "local_commitment", "remote_commitment", "set_local_commitment",
"set_remote_commitment" - just use "get_latest_commitment" instead
2019-08-20 09:03:12 +02:00
SomberNight
fdf8d8609b
lnpeer: make feature-bit testing easier
...
so that we can always test like: self.localfeatures & FEATURE_BIT_OPT
2019-08-20 09:03:12 +02:00
SomberNight
c046f2cc1c
lnhtlc: move 'next_htlc_id' from ChannelConfig to lnhtlc log
2019-08-20 09:03:12 +02:00
SomberNight
087994e39a
lnchannel: move fee update logic to lnhtlc (and hopefully fix it)
2019-08-20 09:03:12 +02:00
ThomasV
3d7f7dfc82
revamp fee updates (draft)
2019-08-20 09:03:12 +02:00
ThomasV
a8ce8109be
Perform breach remedy without sweepstore:
...
- add functions to lnsweep
- lnworker: analyze candidate ctx and htlc_tx
- watchtower will be optional
- add test for breach remedy with spent htlcs
- save tx name as label
2019-08-20 09:03:12 +02:00
SomberNight
acbb458ef7
set default to_self_delay to 1 day
2019-08-20 09:03:11 +02:00
ThomasV
8d77a7ecd8
save timestamps in htlc log
2019-08-20 09:03:11 +02:00
ThomasV
38f1436d78
post rebase fixes
2019-08-20 09:03:11 +02:00
ThomasV
8b12f481da
lightning: display forwarded payments as a single history item
2019-08-20 09:03:11 +02:00
SomberNight
3a2ab149b9
lnchannel: add_htlc and receive_htlc now take and return UpdateAddHtlc
...
also fix undefined vars in _maybe_forward_htlc and _maybe_fulfill_htlc
in lnpeer
2019-08-20 09:03:11 +02:00
ThomasV
3dce65dc73
Rename lnchan, lnchannel_verifier, lnbase
...
Auto-completions are a pain if files share a long prefix
2019-08-20 09:03:11 +02:00
Janus
e6bd3959e0
ln: handle channel limits better, show remote limits in details dialog, replace rusty's testnet peer (doesn't work currently)
2019-08-20 09:03:11 +02:00
Janus
e56e849505
lnchan refactor
...
- replace undoing logic with new HTLCManager class
- separate SENT/RECEIVED
- move UpdateAddHtlc to lnutil
2019-08-20 09:03:11 +02:00
Janus
2c1fcb2f54
ln: remove EncumberedTransaction
2019-08-20 09:03:11 +02:00
Janus
864d910888
qt: channel_details: add more info: sent/received, channel id, funding tx, short channel id, node id
2019-08-20 09:03:11 +02:00
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
2019-08-20 09:03:11 +02:00
Janus
e3409d32ef
channel details with list of htlcs
2019-08-20 09:03:11 +02:00
SomberNight
521fadb8cb
lnutil: restructure channel config namedtuples (local/remote config)
2019-08-20 09:03:11 +02:00
SomberNight
5b7c801ca4
after rebase fixes
2019-08-20 09:03:11 +02:00
Janus
c8dcf0b471
lnwatcher: more detailed logging, support notifying test suite of txs
2019-08-20 09:03:11 +02:00
Janus
001bb4ca09
remove incorrect docstrings, attribute docstring sources where applicable
2019-08-20 09:03:10 +02:00
SomberNight
449ec013fe
add licence headers to more files
2019-08-20 09:03:10 +02:00
Janus
15b0720f5e
lightning channel reserves
2019-08-20 09:03:10 +02:00
Janus
0dfc9e512b
fix co-op close
2019-08-20 09:03:10 +02:00
SomberNight
04ec7e9968
lnutil.make_funding_input: don't return payment pubkeys
...
order depends on who is initiator anyway
2019-08-20 09:03:10 +02:00
Janus
1f97a9753e
redeem htlc outputs of our local commitment transaction back to wallet
2019-08-20 09:03:10 +02:00
SomberNight
7edbd5682a
fix confusion re max path length
2019-08-20 09:03:10 +02:00
SomberNight
2fafd01945
protect against getting robbed through routing fees
2019-08-20 09:03:10 +02:00
SomberNight
d511ecdc00
start failing htlcs
2019-08-20 09:03:10 +02:00
Janus
eabe23f6b8
make function for determining who pays fee
2019-08-20 09:03:10 +02:00
ThomasV
a0acec9720
gather definitions of LN exceptions
2019-08-20 09:03:10 +02:00
ThomasV
409a336071
fix tests (follow-up previous commit)
2019-08-20 09:03:10 +02:00
ThomasV
445252284f
move transport code to its own file
2019-08-20 09:03:10 +02:00