JeremyRand
334d3f2818
Use NamedTuple notation for TxOutput in test_lnchannel
...
This makes the code more resilient in case additional members are added
to TxOutput later.
2019-08-25 06:51:31 +00:00
ThomasV
246cda2928
fix Flake8 tests
2019-08-20 09:03:12 +02:00
SomberNight
ce54b5411e
lnhtlc: htlcs_by_direction now returns dict keyed by htlc_id
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
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
c046f2cc1c
lnhtlc: move 'next_htlc_id' from ChannelConfig to lnhtlc log
2019-08-20 09:03:12 +02:00
SomberNight
c8b19aec2a
lnpeer: make reestablish_channel saner
...
clear up expectations about ctns
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
SomberNight
7431aac5cd
lnhtlc: (fix) was locking in too many updates during commit/revoke
2019-08-20 09:03:12 +02:00
SomberNight
69bffac86a
lnhtlc: fix adding htlc between sending commitment_signed and receiving revoke_and_ack
2019-08-20 09:03:11 +02:00
ThomasV
2b04cb3bc4
fix tests broken by previous commit
2019-08-20 09:03:11 +02:00
SomberNight
e4ed15f683
fix tests
2019-08-20 09:03:11 +02:00
ThomasV
4dc6c6c82e
fix tests (follow up prev commit)
2019-08-20 09:03:11 +02:00
ThomasV
38f1436d78
post rebase fixes
2019-08-20 09:03:11 +02:00
SomberNight
7292da24e6
lnchannel: only consider payments finished when we revoke our old ctx
...
in the old code,
`self.hm.received_in_ctn(self.config[REMOTE].ctn + 1)`
did not really make sense as "received_in_ctn" compares the argument against the LOCAL ctn
2019-08-20 09:03:11 +02:00
Janus
f618bb4a67
lnhtlc: handle settles like adds (asymmetrical across ctns)
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