@ -1043,10 +1043,10 @@ As you can see from the output, the script first gets the node IDs (public keys)
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
Next, we tell each node to establish a network connection to the next node and open a channel:
----
docker-compose exec -T Alice lncli -n regtest connect ${bob_address}@Bob
docker-compose exec -T Alice lncli -n regtest openchannel ${bob_address} 1000000
docker-compose exec -T Alice lncli -n regtest connect ${bob_address//\"}@Bob
docker-compose exec -T Alice lncli -n regtest openchannel ${bob_address//\"} 1000000
----
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
To Bob's node (c-lightning), we send the command:
----
lightning-cli connect ${wei_address}@Wei
lightning-cli fundchannel ${wei_address} 1000000
docker-compose exec -T Bob lightning-cli connect ${wei_address//\"}@Wei
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
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!