tadd comment re lnchannel channel_states - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit a6e3a244e80023ac3c42f691699b759908b22d51 DIR parent bb21e0182354da0e1685b5b9bb34acc8f4483786 HTML Author: SomberNight <somber.night@protonmail.com> Date: Fri, 14 Feb 2020 16:15:25 +0100 add comment re lnchannel channel_states Diffstat: M electrum/lnchannel.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- DIR diff --git a/electrum/lnchannel.py b/electrum/lnchannel.py t@@ -58,13 +58,15 @@ if TYPE_CHECKING: # lightning channel states +# Note: these states are persisted by name (for a given channel) in the wallet file, +# so consider doing a wallet db upgrade when changing them. class channel_states(IntEnum): - PREOPENING = 0 # negociating + PREOPENING = 0 # negotiating OPENING = 1 # awaiting funding tx FUNDED = 2 # funded (requires min_depth and tx verification) OPEN = 3 # both parties have sent funding_locked FORCE_CLOSING = 4 # force-close tx has been broadcast - CLOSING = 5 # closing negociation + CLOSING = 5 # closing negotiation CLOSED = 6 # funding txo has been spent REDEEMED = 7 # we can stop watching t@@ -93,6 +95,7 @@ state_transitions = [ (cs.FORCE_CLOSING, cs.CLOSED), (cs.CLOSED, cs.REDEEMED), ] +del cs # delete as name is ambiguous without context RevokeAndAck = namedtuple("RevokeAndAck", ["per_commitment_secret", "next_per_commitment_point"])