Update nodeconnection.py

This commit is contained in:
Satoshi Nakamoto 2022-03-08 20:05:24 +01:00 committed by GitHub
parent 1bac04418b
commit cda367c81f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -636,7 +636,7 @@ def localFullProtocol():
p3 = os.popen(proto3).read()
proto1 = """lncli listpayments | grep "34349334" | tr -d '"' | tr -d ',' | sed 's/34349334/0a0a2d5079424c4f434b204d6573736167652052656365697665643a200a/g' | html2text | xxd -r -p | xargs --null"""
proto2 = """lncli listpayments | grep "37629171" | tr -d '"' | tr -d ',' | sed 's/7629171/0a0a2d5079424c4f434b204d6573736167652052656365697665643a200a/g' | html2text | xxd -r -p | xargs --null"""
proto2 = """lncli listpayments | grep "7629171" | tr -d '"' | tr -d ',' | sed 's/7629171/0a0a2d5079424c4f434b204d6573736167652052656365697665643a200a/g' | html2text | xxd -r -p | xargs --null"""
proto3 = """lncli listpayments | grep "34343434" | tr -d '"' | tr -d ',' | sed 's/34343434/0a0a2d5079424c4f434b204d6573736167652052656365697665643a200a/g' | html2text | xxd -r -p | xargs --null"""
p1 = os.popen(proto1).list()
p2 = os.popen(proto2).list()
@ -743,7 +743,7 @@ def localchatnewB():
try:
closed()
print("\n\tRead.\n")
os.system("""lncli listinvoices | grep "34349334" | tr -d '"' | tr -d ',' | sed 's/7629171/0a0a202d5079424c4f434b204d6573736167653a200a/g' | html2text | xxd -r -p | xargs --null""")
os.system("""lncli listinvoices | grep "7629171" | tr -d '"' | tr -d ',' | sed 's/7629171/0a0a202d5079424c4f434b204d6573736167653a200a/g' | html2text | xxd -r -p | xargs --null""")
input("\nContinue...")
except:
pass
@ -775,7 +775,13 @@ def localchatsendC():
amount = input("\nAmount in sats: ")
else:
break
os.system("""lncli sendpayment --keysend --d=""" + node + " --amt=" + amount + """ --data 34343434="""" + hex_encoded_message)
os.system(
f"""lncli sendpayment --keysend --d={node} --amt={amount}"""
+ """ --data 34343434="""
+ hex_encoded_message
)
input("\nContinue...")
input("\nContinue...")
except:
pass