You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: node_client.asciidoc
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1043,10 +1043,10 @@ As you can see from the output, the script first gets the node IDs (public keys)
1043
1043
Looking inside the script, we see the part that gets all the node IDs and stores them in temporary variables so that they can be used in subsequent command. It looks like this:
If you have followed the first part of the chapter you will recognise these commands and be able to "decipher" their meaning. It looks quite complex, but we will walk through it step-by-step and you'll quickly get the hang of it.
@@ -1058,8 +1058,8 @@ The following three lines do the same for each of the other nodes. Because they
1058
1058
Next, we tell each node to establish a network connection to the next node and open a channel:
1059
1059
1060
1060
----
1061
-
docker-compose exec -T Alice lncli -n regtest connect ${bob_address}@Bob
1062
-
docker-compose exec -T Alice lncli -n regtest openchannel ${bob_address} 1000000
1061
+
docker-compose exec -T Alice lncli -n regtest connect ${bob_address//\"}@Bob
1062
+
docker-compose exec -T Alice lncli -n regtest openchannel ${bob_address//\"} 1000000
1063
1063
----
1064
1064
1065
1065
Both of the commands are directed to the +Alice+ container since the channel will be opened _from_ +Alice+ _to_ +Bob+, and +Alice+ will initiate the connection.
@@ -1072,20 +1072,20 @@ We do the same with the other nodes, setting up connections and channels. Each n
1072
1072
1073
1073
To Bob's node (c-lightning), we send the command:
1074
1074
----
1075
-
lightning-cli connect ${wei_address}@Wei
1076
-
lightning-cli fundchannel ${wei_address} 1000000
1075
+
docker-compose exec -T Bob lightning-cli connect ${wei_address//\"}@Wei
1076
+
docker-compose exec -T Bob lightning-cli fundchannel ${wei_address//\"} 1000000
The +addinvoice+ command creates an invoice for the specified amount (in satoshis) and produces a JSON object with the invoice details. From that JSON object, we only need the actual bech32-encoded payment request, and we use +jq+ to extract it.
@@ -1095,7 +1095,7 @@ Next, we have to wait. We just created a bunch of channels, which means that our
1095
1095
The final command is the actual payment. We connect to Alice's node and present Gloria's invoice for payment.
We ask Alice's node to pay the invoice, but also ask for +inflight_updates+ in +json+ format. That will give us detailed output about the invoice, the route, the HTLCs and the final payment result, so we can study and learn!
0 commit comments