Adding [source,bash] where needed for the rest of the chapter.

pull/608/head
Hannah 4 years ago
parent 1d6122bdc5
commit 8af6f5361f

@ -1047,6 +1047,7 @@ 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:
[source,bash]
----
alice_address=$(docker-compose exec -T Alice bash -c "lncli -n regtest getinfo | jq .identity_pubkey")
bob_address=$(docker-compose exec -T Bob bash -c "lightning-cli getinfo | jq .id")
@ -1062,6 +1063,7 @@ 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:
[source,bash]
----
docker-compose exec -T Alice lncli -n regtest connect ${bob_address//\"}@Bob
docker-compose exec -T Alice lncli -n regtest openchannel ${bob_address//\"} 1000000
@ -1076,12 +1078,14 @@ Now that +Alice+ is connected, we open a 1,000,000 satoshi channel to +Bob+ with
We do the same with the other nodes, setting up connections and channels. Each node type has a slightly different syntax for these commands, but the overall principle is the same:
To Bob's node (c-lightning) we send these commands:
[source,bash]
----
docker-compose exec -T Bob lightning-cli connect ${wei_address//\"}@Wei
docker-compose exec -T Bob lightning-cli fundchannel ${wei_address//\"} 1000000
----
To Wei's node (Eclair) we send:
[source,bash]
----
docker-compose exec -T Wei eclair-cli -p eclair connect --uri=${gloria_address//\"}@Gloria
docker-compose exec -T Wei eclair-cli -p eclair open --nodeId=${gloria_address//\"} --fundingSatoshis=1000000
@ -1089,6 +1093,7 @@ docker-compose exec -T Wei eclair-cli -p eclair open --nodeId=${gloria_address//
At this point we create a new invoice for 10,000 satoshis on Gloria's node:
[source,bash]
----
gloria_invoice=$(docker-compose exec -T Gloria lncli -n regtest addinvoice 10000 | jq .payment_request)
----
@ -1099,6 +1104,7 @@ Next, we have to wait. We just created a bunch of channels. Hence, our nodes bro
The final command is the actual invoice payment. We connect to Alice's node and present Gloria's invoice for payment.
[source,bash]
----
docker-compose exec -T Alice lncli -n regtest payinvoice --json --inflight_updates -f ${gloria_invoice//\"}
----

Loading…
Cancel
Save