docker: update docker README to account for recent lncli/macaroon changes
This commit is contained in:
parent
4d74fa32a9
commit
3d4843ed6c
@ -68,7 +68,7 @@ $ docker-compose run -d --name alice lnd_btc
|
||||
$ docker exec -i -t alice bash
|
||||
|
||||
# Generate a new backward compatible nested p2sh address for Alice:
|
||||
alice$ lncli newaddress np2wkh
|
||||
alice$ lncli --network=simnet newaddress np2wkh
|
||||
|
||||
# Recreate "btcd" node and set Alice's address as mining address:
|
||||
$ MINING_ADDRESS=<alice_address> docker-compose up -d btcd
|
||||
@ -83,7 +83,7 @@ $ docker-compose run btcctl getblockchaininfo | grep -A 1 segwit
|
||||
|
||||
Check `Alice` balance:
|
||||
```
|
||||
alice$ lncli walletbalance
|
||||
alice$ lncli --network=simnet walletbalance
|
||||
```
|
||||
|
||||
Connect `Bob` node to `Alice` node.
|
||||
@ -94,7 +94,7 @@ $ docker-compose run -d --name bob lnd_btc
|
||||
$ docker exec -i -t bob bash
|
||||
|
||||
# Get the identity pubkey of "Bob" node:
|
||||
bob$ lncli getinfo
|
||||
bob$ lncli --network=simnet getinfo
|
||||
|
||||
{
|
||||
----->"identity_pubkey": "0343bc80b914aebf8e50eb0b8e445fc79b9e6e8e5e018fa8c5f85c7d429c117b38",
|
||||
@ -115,10 +115,10 @@ bob$ lncli getinfo
|
||||
$ docker inspect bob | grep IPAddress
|
||||
|
||||
# Connect "Alice" to the "Bob" node:
|
||||
alice$ lncli connect <bob_pubkey>@<bob_host>
|
||||
alice$ lncli --network=simnet connect <bob_pubkey>@<bob_host>
|
||||
|
||||
# Check list of peers on "Alice" side:
|
||||
alice$ lncli listpeers
|
||||
alice$ lncli --network=simnet listpeers
|
||||
{
|
||||
"peers": [
|
||||
{
|
||||
@ -135,7 +135,7 @@ alice$ lncli listpeers
|
||||
}
|
||||
|
||||
# Check list of peers on "Bob" side:
|
||||
bob$ lncli listpeers
|
||||
bob$ lncli --network=simnet listpeers
|
||||
{
|
||||
"peers": [
|
||||
{
|
||||
@ -155,13 +155,13 @@ bob$ lncli listpeers
|
||||
Create the `Alice<->Bob` channel.
|
||||
```bash
|
||||
# Open the channel with "Bob":
|
||||
alice$ lncli openchannel --node_key=<bob_identity_pubkey> --local_amt=1000000
|
||||
alice$ lncli --network=simnet openchannel --node_key=<bob_identity_pubkey> --local_amt=1000000
|
||||
|
||||
# Include funding transaction in block thereby opening the channel:
|
||||
$ docker-compose run btcctl generate 3
|
||||
|
||||
# Check that channel with "Bob" was opened:
|
||||
alice$ lncli listchannels
|
||||
alice$ lncli --network=simnet listchannels
|
||||
{
|
||||
"channels": [
|
||||
{
|
||||
@ -190,20 +190,20 @@ alice$ lncli listchannels
|
||||
Send the payment from `Alice` to `Bob`.
|
||||
```bash
|
||||
# Add invoice on "Bob" side:
|
||||
bob$ lncli addinvoice --amt=10000
|
||||
bob$ lncli --network=simnet addinvoice --amt=10000
|
||||
{
|
||||
"r_hash": "<your_random_rhash_here>",
|
||||
"pay_req": "<encoded_invoice>",
|
||||
}
|
||||
|
||||
# Send payment from "Alice" to "Bob":
|
||||
alice$ lncli sendpayment --pay_req=<encoded_invoice>
|
||||
alice$ lncli --network=simnet sendpayment --pay_req=<encoded_invoice>
|
||||
|
||||
# Check "Alice"'s channel balance
|
||||
alice$ lncli channelbalance
|
||||
alice$ lncli --network=simnet channelbalance
|
||||
|
||||
# Check "Bob"'s channel balance
|
||||
bob$ lncli channelbalance
|
||||
bob$ lncli --network=simnet channelbalance
|
||||
```
|
||||
|
||||
Now we have open channel in which we sent only one payment, let's imagine
|
||||
@ -212,7 +212,7 @@ it!
|
||||
```bash
|
||||
# List the "Alice" channel and retrieve "channel_point" which represents
|
||||
# the opened channel:
|
||||
alice$ lncli listchannels
|
||||
alice$ lncli --network=simnet listchannels
|
||||
{
|
||||
"channels": [
|
||||
{
|
||||
@ -239,17 +239,17 @@ alice$ lncli listchannels
|
||||
|
||||
# Channel point consists of two numbers separated by a colon. The first one
|
||||
# is "funding_txid" and the second one is "output_index":
|
||||
alice$ lncli closechannel --funding_txid=<funding_txid> --output_index=<output_index>
|
||||
alice$ lncli --network=simnet closechannel --funding_txid=<funding_txid> --output_index=<output_index>
|
||||
|
||||
# Include close transaction in a block thereby closing the channel:
|
||||
$ docker-compose run btcctl generate 3
|
||||
|
||||
# Check "Alice" on-chain balance was credited by her settled amount in the channel:
|
||||
alice$ lncli walletbalance
|
||||
alice$ lncli --network=simnet walletbalance
|
||||
|
||||
# Check "Bob" on-chain balance was credited with the funds he received in the
|
||||
# channel:
|
||||
bob$ lncli walletbalance
|
||||
bob$ lncli --network=simnet walletbalance
|
||||
{
|
||||
"total_balance": "10000",
|
||||
"confirmed_balance": "10000",
|
||||
@ -309,7 +309,7 @@ The `Faucet` node address can be found at the [Faucet Lightning Community webpag
|
||||
$ docker-compose up -d "alice"; docker exec -i -t "alice" bash
|
||||
|
||||
# Connect "Alice" to the "Faucet" node:
|
||||
alice$ lncli connect <faucet_identity_address>@<faucet_host>
|
||||
alice$ lncli --network=simnet connect <faucet_identity_address>@<faucet_host>
|
||||
```
|
||||
|
||||
After a connection is achieved, the `Faucet` node should create the channel
|
||||
|
Loading…
Reference in New Issue
Block a user