Update PyBlock.py

This commit is contained in:
curly60e 2022-12-19 15:26:54 -03:00 committed by GitHub
parent 5c6ac73966
commit d2e08fe8f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6927,22 +6927,11 @@ def nostrConn():
a = os.popen(path['bitcoincli'] + bitcoincli).read()
b = json.loads(a)
d = b
lncli = " getinfo"
lsd = os.popen(lndconnectload['ln'] + lncli).read()
lsd0 = str(lsd)
alias = json.loads(lsd0)
else:
a = "Local" if path['bitcoincli'] else "Remote"
blk = rpc('getblockchaininfo')
d = blk
cert_path = lndconnectload["tls"]
macaroon = codecs.encode(open(lndconnectload["macaroon"], 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
url = f'https://{lndconnectload["ip_port"]}/v1/getinfo'
r = requests.get(url, headers=headers, verify=cert_path)
alias = r.json()
print("""\t\t
\033[1;37;40m{}\033[0;37;40m: \033[1;31;40mPyBLOCK\033[0;37;40m
\033[1;37;40mNode\033[0;37;40m: \033[1;33;40m{}\033[0;37;40m