2
0
mirror of https://github.com/lnbook/lnbook synced 2024-11-18 21:28:03 +00:00

source formatting

This commit is contained in:
Andreas M. Antonopoulos 2021-03-23 11:08:43 -06:00
parent 6840a842af
commit 6c6b2c9c80

View File

@ -593,6 +593,7 @@ install cli/lightning-cli lightningd/lightningd /usr/local/bin
In order to verify that the +lightningd+ and +lightning-cli+ commands have been installed correctly we will ask each executable for its version information: In order to verify that the +lightningd+ and +lightning-cli+ commands have been installed correctly we will ask each executable for its version information:
[source,bash]
---- ----
$ lightningd --version $ lightningd --version
v0.8.1rc2 v0.8.1rc2
@ -614,6 +615,7 @@ In the next few sections we will build a docker container to run LND, build LND
If you have followed the previous examples in this chapter, you should be quite familiar with the basic docker commands by now. In this section we will repeat them to build the LND container. The container is located in +code/docker/lnd+. We issue commands in a terminal to change the working directory to +code/docker+ and perform the +docker build+ command: If you have followed the previous examples in this chapter, you should be quite familiar with the basic docker commands by now. In this section we will repeat them to build the LND container. The container is located in +code/docker/lnd+. We issue commands in a terminal to change the working directory to +code/docker+ and perform the +docker build+ command:
[source,bash]
---- ----
$ cd code/docker $ cd code/docker
$ docker build -t lnbook/lnd lnd $ docker build -t lnbook/lnd lnd
@ -718,7 +720,7 @@ $ go version
go version go1.13.4 linux/amd64 go version go1.13.4 linux/amd64
---- ----
We have 1.13.4, so we're ready to... Go! Next we need to tell any programs where to find the Go code. This is accomplished by setting the environment variable +GOPATH+. Usually the Go code is located in a directory named +gocode+ directly in the user's home directory. With the following two commands we consistently set the +GOPATH+ and make sure your shell adds it to your executable +PATH+. Note that the user's home directory is referred to as +~+ in the shell. We have 1.13.4, so we're ready to... Go! Next we need to tell any programs where to find the Go code. This is accomplished by setting the environment variable +GOPATH+. Usually the Go code is located in a directory named +gocode+ directly in the user's home directory. With the following two commands we consistently set the +GOPATH+ and make sure your shell adds it to your executable +PATH+. Note that the user's home directory is referred to as +~+ in the shell.
---- ----
$ export GOPATH=~/gocode $ export GOPATH=~/gocode
@ -887,6 +889,7 @@ We have OpenJDK 11.0.7 and Maven 3.6.1, so we're ready.
The source code for Eclair is on Github. The +git clone+ command can create a local copy for us. Let's change to our home directory and run it there: The source code for Eclair is on Github. The +git clone+ command can create a local copy for us. Let's change to our home directory and run it there:
[source,bash]
---- ----
$ cd ~ $ cd ~
$ git clone https://github.com/ACINQ/eclair.git $ git clone https://github.com/ACINQ/eclair.git
@ -1106,7 +1109,7 @@ We do the same with the other nodes, setting up connections and channels. Each n
To Bob's node (c-lightning) we send these commands: To Bob's node (c-lightning) we send these commands:
[source,bash] [source,bash]
---- ----
docker-compose exec -T Bob lightning-cli connect ${chan_address//\"}@Chan docker-compose exec -T Bob lightning-cli connect ${chan_address//\"}@Chan
docker-compose exec -T Bob lightning-cli fundchannel ${chan_address//\"} 1000000 docker-compose exec -T Bob lightning-cli fundchannel ${chan_address//\"} 1000000
---- ----
@ -1168,4 +1171,4 @@ Lightning Polar (download from https://lightningpolar.com) allows you to visuali
=== Conclusion === Conclusion
In this chapter we looked at various projects that implement the BOLT specifications. We built containers to run a sample Lightning network and learned how to build each project from source code. You are now ready to explore further and dig deeper. In this chapter we looked at various projects that implement the BOLT specifications. We built containers to run a sample Lightning network and learned how to build each project from source code. You are now ready to explore further and dig deeper.