mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-20 13:54:36 +01:00
contrib: add the dev- options to the config iff DEVELOPER=1 configured
We scan config.vars to figure out if you configured developer on or off. If it's on, we add the dev-only options to the config. Fixes: #4400 Reported-By: Jonathan Harvey-Buschel @jharveyb
This commit is contained in:
parent
2586641678
commit
9776e23b83
2 changed files with 18 additions and 3 deletions
12
README.md
12
README.md
|
@ -55,14 +55,24 @@ sudo apt-get install bitcoind lightningd
|
|||
|
||||
### Starting `lightningd`
|
||||
|
||||
#### Regtest (local, fast-start) Option
|
||||
If you want to experiment with `lightningd`, there's a script to set
|
||||
up a `bitcoind` regtest test network of two local lightning nodes,
|
||||
which provides a convenient `start_ln` helper:
|
||||
which provides a convenient `start_ln` helper. See the notes at the top
|
||||
of the `startup_regtest.sh` file for details on how to use it.
|
||||
|
||||
```bash
|
||||
. contrib/startup_regtest.sh
|
||||
```
|
||||
|
||||
Note that your local nodeset will be much faster/more responsive if
|
||||
you've configured your node to expose the developer options, e.g.
|
||||
|
||||
```bash
|
||||
./configure --enable-developer
|
||||
```
|
||||
|
||||
#### Mainnet Option
|
||||
To test with real bitcoin, you will need to have a local `bitcoind` node running:
|
||||
|
||||
```bash
|
||||
|
|
|
@ -86,10 +86,15 @@ start_nodes() {
|
|||
log-level=debug
|
||||
log-file=/tmp/l$i-$network/log
|
||||
addr=localhost:$socket
|
||||
dev-fast-gossip
|
||||
dev-bitcoind-poll=5
|
||||
EOF
|
||||
|
||||
# If we've configured to use developer, add dev options
|
||||
if $LIGHTNINGD --help | grep -q dev-fast-gossip; then
|
||||
echo "dev-fast-gossip" >> "/tmp/l$i-$network/config"
|
||||
echo "dev-bitcoind-poll=5" >> "/tmp/l$i-$network/config"
|
||||
fi
|
||||
|
||||
|
||||
# Start the lightning nodes
|
||||
test -f "/tmp/l$i-$network/lightningd-$network.pid" || \
|
||||
"$LIGHTNINGD" "--lightning-dir=/tmp/l$i-$network" --daemon
|
||||
|
|
Loading…
Add table
Reference in a new issue