Browse Source
add comment re lnchannel channel_states
hard-fail-on-bad-server-string
SomberNight
5 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
5 additions and
2 deletions
-
electrum/lnchannel.py
|
|
@ -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 |
|
|
|
|
|
|
@ -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"]) |
|
|
|