1
0

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
This commit is contained in:
SomberNight
2019-08-03 17:34:11 +02:00
committed by ThomasV
parent e32807d29d
commit b1f606eaed
6 changed files with 126 additions and 154 deletions

View File

@@ -52,7 +52,6 @@ class LocalConfig(NamedTuple):
was_announced: bool
current_commitment_signature: Optional[bytes]
current_htlc_signatures: List[bytes]
got_sig_for_next: bool
class RemoteConfig(NamedTuple):