mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 14:22:37 +01:00
docs: fix inconsistent naming of channel.backup [skip ci]
This commit is contained in:
parent
07fa98fca5
commit
00f7534e06
4 changed files with 20 additions and 20 deletions
|
@ -2487,7 +2487,7 @@ var exportChanBackupCommand = cli.Command{
|
||||||
of the static channel backup, a serialized version of
|
of the static channel backup, a serialized version of
|
||||||
the backup (either Single or Multi) will be written to
|
the backup (either Single or Multi) will be written to
|
||||||
the target file, this is the same format used by lnd in
|
the target file, this is the same format used by lnd in
|
||||||
its channels.backup file `,
|
its channel.backup file `,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: actionDecorator(exportChanBackup),
|
Action: actionDecorator(exportChanBackup),
|
||||||
|
@ -2616,7 +2616,7 @@ var verifyChanBackupCommand = cli.Command{
|
||||||
static channel backups in single blob.
|
static channel backups in single blob.
|
||||||
|
|
||||||
* A file path which points to a packed multi-channel backup within a
|
* A file path which points to a packed multi-channel backup within a
|
||||||
file, using the same format that lnd does in its channels.backup
|
file, using the same format that lnd does in its channel.backup
|
||||||
file.
|
file.
|
||||||
`,
|
`,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
@ -2683,7 +2683,7 @@ var restoreChanBackupCommand = cli.Command{
|
||||||
Description: `
|
Description: `
|
||||||
Allows a user to restore a Static Channel Backup (SCB) that was
|
Allows a user to restore a Static Channel Backup (SCB) that was
|
||||||
obtained either via the exportchanbackup command, or from lnd's
|
obtained either via the exportchanbackup command, or from lnd's
|
||||||
automatically managed channels.backup file. This command should be used
|
automatically managed channel.backup file. This command should be used
|
||||||
if a user is attempting to restore a channel due to data loss on a
|
if a user is attempting to restore a channel due to data loss on a
|
||||||
running node restored with the same seed as the node that created the
|
running node restored with the same seed as the node that created the
|
||||||
channel. If successful, this command will allows the user to recover
|
channel. If successful, this command will allows the user to recover
|
||||||
|
@ -2698,7 +2698,7 @@ var restoreChanBackupCommand = cli.Command{
|
||||||
static channel backups in single blob.
|
static channel backups in single blob.
|
||||||
|
|
||||||
* A file path which points to a packed multi-channel backup within a
|
* A file path which points to a packed multi-channel backup within a
|
||||||
file, using the same format that lnd does in its channels.backup
|
file, using the same format that lnd does in its channel.backup
|
||||||
file.
|
file.
|
||||||
`,
|
`,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
|
|
@ -242,7 +242,7 @@ process.
|
||||||
#### On-Disk `channel.backup`
|
#### On-Disk `channel.backup`
|
||||||
|
|
||||||
There are multiple ways of obtaining SCBs from `lnd`. The most commonly used
|
There are multiple ways of obtaining SCBs from `lnd`. The most commonly used
|
||||||
method will likely be via the `channels.backup` file that's stored on-disk
|
method will likely be via the `channel.backup` file that's stored on-disk
|
||||||
alongside the rest of the chain data. This is a special file that contains SCB
|
alongside the rest of the chain data. This is a special file that contains SCB
|
||||||
entries for _all_ currently open channels. Each time a channel is opened or
|
entries for _all_ currently open channels. Each time a channel is opened or
|
||||||
closed, this file is updated on disk in a safe manner (atomic file rename). As
|
closed, this file is updated on disk in a safe manner (atomic file rename). As
|
||||||
|
@ -273,7 +273,7 @@ Another way to obtain SCBS for all or a target channel is via the new
|
||||||
"multi_chan_backup": "fd73e992e5133aa085c8e45548e0189c411c8cfe42e902b0ee2dec528a18fb472c3375447868ffced0d4812125e4361d667b7e6a18b2357643e09bbe7e9110c6b28d74f4f55e7c29e92419b52509e5c367cf2d977b670a2ff7560f5fe24021d246abe30542e6c6e3aa52f903453c3a2389af918249dbdb5f1199aaecf4931c0366592165b10bdd58eaf706d6df02a39d9323a0c65260ffcc84776f2705e4942d89e4dbefa11c693027002c35582d56e295dcf74d27e90873699657337696b32c05c8014911a7ec8eb03bdbe526fe658be8abdf50ab12c4fec9ddeefc489cf817721c8e541d28fbe71e32137b5ea066a9f4e19814deedeb360def90eff2965570aab5fedd0ebfcd783ce3289360953680ac084b2e988c9cbd0912da400861467d7bb5ad4b42a95c2d541653e805cbfc84da401baf096fba43300358421ae1b43fd25f3289c8c73489977592f75bc9f73781f41718a752ab325b70c8eb2011c5d979f6efc7a76e16492566e43d94dbd42698eb06ff8ad4fd3f2baabafded"
|
"multi_chan_backup": "fd73e992e5133aa085c8e45548e0189c411c8cfe42e902b0ee2dec528a18fb472c3375447868ffced0d4812125e4361d667b7e6a18b2357643e09bbe7e9110c6b28d74f4f55e7c29e92419b52509e5c367cf2d977b670a2ff7560f5fe24021d246abe30542e6c6e3aa52f903453c3a2389af918249dbdb5f1199aaecf4931c0366592165b10bdd58eaf706d6df02a39d9323a0c65260ffcc84776f2705e4942d89e4dbefa11c693027002c35582d56e295dcf74d27e90873699657337696b32c05c8014911a7ec8eb03bdbe526fe658be8abdf50ab12c4fec9ddeefc489cf817721c8e541d28fbe71e32137b5ea066a9f4e19814deedeb360def90eff2965570aab5fedd0ebfcd783ce3289360953680ac084b2e988c9cbd0912da400861467d7bb5ad4b42a95c2d541653e805cbfc84da401baf096fba43300358421ae1b43fd25f3289c8c73489977592f75bc9f73781f41718a752ab325b70c8eb2011c5d979f6efc7a76e16492566e43d94dbd42698eb06ff8ad4fd3f2baabafded"
|
||||||
}
|
}
|
||||||
|
|
||||||
⛰ lncli --network=simnet exportchanbackup --all --output_file=channels.backup
|
⛰ lncli --network=simnet exportchanbackup --all --output_file=channel.backup
|
||||||
```
|
```
|
||||||
|
|
||||||
As shown above, a user can either: specify a specific channel to backup, backup
|
As shown above, a user can either: specify a specific channel to backup, backup
|
||||||
|
@ -293,7 +293,7 @@ schemes, compared to the file system notification based approach.
|
||||||
If a node is being created from scratch, then it's possible to pass in an
|
If a node is being created from scratch, then it's possible to pass in an
|
||||||
existing SCB using the `lncli create` or `lncli unlock` commands:
|
existing SCB using the `lncli create` or `lncli unlock` commands:
|
||||||
```shell
|
```shell
|
||||||
⛰ lncli create -multi_file=channels.backup
|
⛰ lncli create -multi_file=channel.backup
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, the `restorechanbackup` command can be used if `lnd` has already
|
Alternatively, the `restorechanbackup` command can be used if `lnd` has already
|
||||||
|
@ -313,7 +313,7 @@ DESCRIPTION:
|
||||||
|
|
||||||
Allows a user to restore a Static Channel Backup (SCB) that was
|
Allows a user to restore a Static Channel Backup (SCB) that was
|
||||||
obtained either via the exportchanbackup command, or from lnd's
|
obtained either via the exportchanbackup command, or from lnd's
|
||||||
automatically managed channels.backup file. This command should be used
|
automatically managed channel.backup file. This command should be used
|
||||||
if a user is attempting to restore a channel due to data loss on a
|
if a user is attempting to restore a channel due to data loss on a
|
||||||
running node restored with the same seed as the node that created the
|
running node restored with the same seed as the node that created the
|
||||||
channel. If successful, this command will allows the user to recover
|
channel. If successful, this command will allows the user to recover
|
||||||
|
@ -328,7 +328,7 @@ DESCRIPTION:
|
||||||
static channel backups in single blob.
|
static channel backups in single blob.
|
||||||
|
|
||||||
* A file path which points to a packed multi-channel backup within a
|
* A file path which points to a packed multi-channel backup within a
|
||||||
file, using the same format that lnd does in its channels.backup
|
file, using the same format that lnd does in its channel.backup
|
||||||
file.
|
file.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
|
||||||
mnemonic []string) (nodeRestorer, error) {
|
mnemonic []string) (nodeRestorer, error) {
|
||||||
|
|
||||||
// Read the entire Multi backup stored within
|
// Read the entire Multi backup stored within
|
||||||
// this node's channels.backup file.
|
// this node's channel.backup file.
|
||||||
multi, err := ioutil.ReadFile(backupFilePath)
|
multi, err := ioutil.ReadFile(backupFilePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -87,7 +87,7 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
|
||||||
|
|
||||||
// Now that we have Dave's backup file, we'll
|
// Now that we have Dave's backup file, we'll
|
||||||
// create a new nodeRestorer that will restore
|
// create a new nodeRestorer that will restore
|
||||||
// using the on-disk channels.backup.
|
// using the on-disk channel.backup.
|
||||||
return chanRestoreViaRPC(
|
return chanRestoreViaRPC(
|
||||||
net, password, mnemonic, multi, oldNode,
|
net, password, mnemonic, multi, oldNode,
|
||||||
)
|
)
|
||||||
|
@ -190,7 +190,7 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
|
||||||
mnemonic []string) (nodeRestorer, error) {
|
mnemonic []string) (nodeRestorer, error) {
|
||||||
|
|
||||||
// Read the entire Multi backup stored within
|
// Read the entire Multi backup stored within
|
||||||
// this node's channels.backup file.
|
// this node's channel.backup file.
|
||||||
multi, err := ioutil.ReadFile(backupFilePath)
|
multi, err := ioutil.ReadFile(backupFilePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -198,7 +198,7 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
|
||||||
|
|
||||||
// Now that we have Dave's backup file, we'll
|
// Now that we have Dave's backup file, we'll
|
||||||
// create a new nodeRestorer that will restore
|
// create a new nodeRestorer that will restore
|
||||||
// using the on-disk channels.backup.
|
// using the on-disk channel.backup.
|
||||||
backup := &lnrpc.RestoreChanBackupRequest_MultiChanBackup{
|
backup := &lnrpc.RestoreChanBackupRequest_MultiChanBackup{
|
||||||
MultiChanBackup: multi,
|
MultiChanBackup: multi,
|
||||||
}
|
}
|
||||||
|
@ -258,7 +258,7 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
|
||||||
mnemonic []string) (nodeRestorer, error) {
|
mnemonic []string) (nodeRestorer, error) {
|
||||||
|
|
||||||
// Read the entire Multi backup stored within
|
// Read the entire Multi backup stored within
|
||||||
// this node's channels.backup file.
|
// this node's channel.backup file.
|
||||||
multi, err := ioutil.ReadFile(backupFilePath)
|
multi, err := ioutil.ReadFile(backupFilePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -345,7 +345,7 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
|
||||||
mnemonic []string) (nodeRestorer, error) {
|
mnemonic []string) (nodeRestorer, error) {
|
||||||
|
|
||||||
// Read the entire Multi backup stored within
|
// Read the entire Multi backup stored within
|
||||||
// this node's channels.backup file.
|
// this node's channel.backup file.
|
||||||
multi, err := ioutil.ReadFile(backupFilePath)
|
multi, err := ioutil.ReadFile(backupFilePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -353,7 +353,7 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
|
||||||
|
|
||||||
// Now that we have Dave's backup file, we'll
|
// Now that we have Dave's backup file, we'll
|
||||||
// create a new nodeRestorer that will restore
|
// create a new nodeRestorer that will restore
|
||||||
// using the on-disk channels.backup.
|
// using the on-disk channel.backup.
|
||||||
return chanRestoreViaRPC(
|
return chanRestoreViaRPC(
|
||||||
net, password, mnemonic, multi, oldNode,
|
net, password, mnemonic, multi, oldNode,
|
||||||
)
|
)
|
||||||
|
@ -405,7 +405,7 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
|
||||||
mnemonic []string) (nodeRestorer, error) {
|
mnemonic []string) (nodeRestorer, error) {
|
||||||
|
|
||||||
// Read the entire Multi backup stored within
|
// Read the entire Multi backup stored within
|
||||||
// this node's channels.backup file.
|
// this node's channel.backup file.
|
||||||
multi, err := ioutil.ReadFile(backupFilePath)
|
multi, err := ioutil.ReadFile(backupFilePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -413,7 +413,7 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
|
||||||
|
|
||||||
// Now that we have Dave's backup file, we'll
|
// Now that we have Dave's backup file, we'll
|
||||||
// create a new nodeRestorer that will restore
|
// create a new nodeRestorer that will restore
|
||||||
// using the on-disk channels.backup.
|
// using the on-disk channel.backup.
|
||||||
return chanRestoreViaRPC(
|
return chanRestoreViaRPC(
|
||||||
net, password, mnemonic, multi, oldNode,
|
net, password, mnemonic, multi, oldNode,
|
||||||
)
|
)
|
||||||
|
@ -443,7 +443,7 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// testChannelBackupUpdates tests that both the streaming channel update RPC,
|
// testChannelBackupUpdates tests that both the streaming channel update RPC,
|
||||||
// and the on-disk channels.backup are updated each time a channel is
|
// and the on-disk channel.backup are updated each time a channel is
|
||||||
// opened/closed.
|
// opened/closed.
|
||||||
func testChannelBackupUpdates(net *lntest.NetworkHarness, t *harnessTest) {
|
func testChannelBackupUpdates(net *lntest.NetworkHarness, t *harnessTest) {
|
||||||
ctxb := context.Background()
|
ctxb := context.Background()
|
||||||
|
|
|
@ -521,7 +521,7 @@ func (hn *HarnessNode) TLSKeyStr() string {
|
||||||
return hn.Cfg.TLSKeyPath
|
return hn.Cfg.TLSKeyPath
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChanBackupPath returns the fielpath to the on-disk channels.backup file for
|
// ChanBackupPath returns the fielpath to the on-disk channel.backup file for
|
||||||
// this node.
|
// this node.
|
||||||
func (hn *HarnessNode) ChanBackupPath() string {
|
func (hn *HarnessNode) ChanBackupPath() string {
|
||||||
return hn.Cfg.ChanBackupPath()
|
return hn.Cfg.ChanBackupPath()
|
||||||
|
|
Loading…
Add table
Reference in a new issue