ln: save remote node_id in channel
This commit is contained in:
@@ -273,7 +273,7 @@ OnlyPubkeyKeypair = namedtuple("OnlyPubkeyKeypair", ["pubkey"])
|
|||||||
RemoteState = namedtuple("RemoteState", ["ctn", "next_per_commitment_point", "amount_msat", "revocation_store", "last_per_commitment_point", "next_htlc_id"])
|
RemoteState = namedtuple("RemoteState", ["ctn", "next_per_commitment_point", "amount_msat", "revocation_store", "last_per_commitment_point", "next_htlc_id"])
|
||||||
LocalState = namedtuple("LocalState", ["ctn", "per_commitment_secret_seed", "amount_msat", "next_htlc_id"])
|
LocalState = namedtuple("LocalState", ["ctn", "per_commitment_secret_seed", "amount_msat", "next_htlc_id"])
|
||||||
ChannelConstraints = namedtuple("ChannelConstraints", ["feerate", "capacity", "is_initiator", "funding_txn_minimum_depth"])
|
ChannelConstraints = namedtuple("ChannelConstraints", ["feerate", "capacity", "is_initiator", "funding_txn_minimum_depth"])
|
||||||
OpenChannel = namedtuple("OpenChannel", ["channel_id", "short_channel_id", "funding_outpoint", "local_config", "remote_config", "remote_state", "local_state", "constraints"])
|
OpenChannel = namedtuple("OpenChannel", ["channel_id", "short_channel_id", "funding_outpoint", "local_config", "remote_config", "remote_state", "local_state", "constraints", "node_id"])
|
||||||
|
|
||||||
|
|
||||||
def aiosafe(f):
|
def aiosafe(f):
|
||||||
@@ -933,6 +933,7 @@ class Peer(PrintError):
|
|||||||
assert success, success
|
assert success, success
|
||||||
their_revocation_store = RevocationStore()
|
their_revocation_store = RevocationStore()
|
||||||
chan = OpenChannel(
|
chan = OpenChannel(
|
||||||
|
node_id=self.pubkey,
|
||||||
channel_id=channel_id,
|
channel_id=channel_id,
|
||||||
short_channel_id=None,
|
short_channel_id=None,
|
||||||
funding_outpoint=Outpoint(funding_txid, funding_index),
|
funding_outpoint=Outpoint(funding_txid, funding_index),
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ from . import lnrouter
|
|||||||
is_key = lambda k: k.endswith("_basepoint") or k.endswith("_key")
|
is_key = lambda k: k.endswith("_basepoint") or k.endswith("_key")
|
||||||
|
|
||||||
def maybeDecode(k, v):
|
def maybeDecode(k, v):
|
||||||
if k in ["short_channel_id", "pubkey", "privkey", "last_per_commitment_point", "next_per_commitment_point", "per_commitment_secret_seed"] and v is not None:
|
if k in ["node_id", "short_channel_id", "pubkey", "privkey", "last_per_commitment_point", "next_per_commitment_point", "per_commitment_secret_seed"] and v is not None:
|
||||||
return binascii.unhexlify(v)
|
return binascii.unhexlify(v)
|
||||||
return v
|
return v
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user