mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-27 23:41:35 +00:00
lnbase: communication privkey belongs to peer
This commit is contained in:
parent
668c3887d6
commit
dd73a4596e
1 changed files with 3 additions and 4 deletions
|
@ -249,10 +249,10 @@ def aiosafe(f):
|
||||||
|
|
||||||
class Peer(PrintError):
|
class Peer(PrintError):
|
||||||
|
|
||||||
def __init__(self, privkey, host, port, pubkey):
|
def __init__(self, host, port, pubkey):
|
||||||
self.host = host
|
self.host = host
|
||||||
self.port = port
|
self.port = port
|
||||||
self.privkey = privkey
|
self.privkey = os.urandom(32) + b"\x01"
|
||||||
self.pubkey = pubkey
|
self.pubkey = pubkey
|
||||||
self.read_buffer = b''
|
self.read_buffer = b''
|
||||||
self.ping_time = 0
|
self.ping_time = 0
|
||||||
|
@ -427,8 +427,7 @@ class LNWorker:
|
||||||
#host, port, pubkey = ('localhost', '9735', subprocess.Popen("~/go/bin/lncli getinfo | jq -r .identity_pubkey", shell=True, stdout=subprocess.PIPE).communicate()[0].strip())
|
#host, port, pubkey = ('localhost', '9735', subprocess.Popen("~/go/bin/lncli getinfo | jq -r .identity_pubkey", shell=True, stdout=subprocess.PIPE).communicate()[0].strip())
|
||||||
pubkey = binascii.unhexlify(pubkey)
|
pubkey = binascii.unhexlify(pubkey)
|
||||||
port = int(port)
|
port = int(port)
|
||||||
privkey = os.urandom(32) + b"\x01"
|
self.peer = Peer(host, port, pubkey)
|
||||||
self.peer = Peer(privkey, host, port, pubkey)
|
|
||||||
self.network.futures.append(asyncio.run_coroutine_threadsafe(self.peer.main_loop(), asyncio.get_event_loop()))
|
self.network.futures.append(asyncio.run_coroutine_threadsafe(self.peer.main_loop(), asyncio.get_event_loop()))
|
||||||
|
|
||||||
def openchannel(self):
|
def openchannel(self):
|
||||||
|
|
Loading…
Add table
Reference in a new issue