Skip to content

Commit

Permalink
Merge pull request #5620 from szollo/master
Browse files Browse the repository at this point in the history
docs: fix inconsistent naming of channel.backup [skip ci]
  • Loading branch information
guggero authored Aug 12, 2021
2 parents 07fa98f + 00f7534 commit f7384a0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions cmd/lncli/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -2487,7 +2487,7 @@ var exportChanBackupCommand = cli.Command{
of the static channel backup, a serialized version of
the backup (either Single or Multi) will be written to
the target file, this is the same format used by lnd in
its channels.backup file `,
its channel.backup file `,
},
},
Action: actionDecorator(exportChanBackup),
Expand Down Expand Up @@ -2616,7 +2616,7 @@ var verifyChanBackupCommand = cli.Command{
static channel backups in single blob.
* 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.
`,
Flags: []cli.Flag{
Expand Down Expand Up @@ -2683,7 +2683,7 @@ var restoreChanBackupCommand = cli.Command{
Description: `
Allows a user to restore a Static Channel Backup (SCB) that was
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
running node restored with the same seed as the node that created the
channel. If successful, this command will allows the user to recover
Expand All @@ -2698,7 +2698,7 @@ var restoreChanBackupCommand = cli.Command{
static channel backups in single blob.
* 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.
`,
Flags: []cli.Flag{
Expand Down
10 changes: 5 additions & 5 deletions docs/recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ process.
#### On-Disk `channel.backup`

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
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
Expand Down Expand Up @@ -273,7 +273,7 @@ Another way to obtain SCBS for all or a target channel is via the new
"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
Expand All @@ -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
existing SCB using the `lncli create` or `lncli unlock` commands:
```shell
⛰ lncli create -multi_file=channels.backup
⛰ lncli create -multi_file=channel.backup
```

Alternatively, the `restorechanbackup` command can be used if `lnd` has already
Expand All @@ -313,7 +313,7 @@ DESCRIPTION:

Allows a user to restore a Static Channel Backup (SCB) that was
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
running node restored with the same seed as the node that created the
channel. If successful, this command will allows the user to recover
Expand All @@ -328,7 +328,7 @@ DESCRIPTION:
static channel backups in single blob.
* 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.
Expand Down
20 changes: 10 additions & 10 deletions lntest/itest/lnd_channel_backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
mnemonic []string) (nodeRestorer, error) {

// Read the entire Multi backup stored within
// this node's channels.backup file.
// this node's channel.backup file.
multi, err := ioutil.ReadFile(backupFilePath)
if err != nil {
return nil, err
}

// Now that we have Dave's backup file, we'll
// create a new nodeRestorer that will restore
// using the on-disk channels.backup.
// using the on-disk channel.backup.
return chanRestoreViaRPC(
net, password, mnemonic, multi, oldNode,
)
Expand Down Expand Up @@ -190,15 +190,15 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
mnemonic []string) (nodeRestorer, error) {

// Read the entire Multi backup stored within
// this node's channels.backup file.
// this node's channel.backup file.
multi, err := ioutil.ReadFile(backupFilePath)
if err != nil {
return nil, err
}

// Now that we have Dave's backup file, we'll
// create a new nodeRestorer that will restore
// using the on-disk channels.backup.
// using the on-disk channel.backup.
backup := &lnrpc.RestoreChanBackupRequest_MultiChanBackup{
MultiChanBackup: multi,
}
Expand Down Expand Up @@ -258,7 +258,7 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
mnemonic []string) (nodeRestorer, error) {

// Read the entire Multi backup stored within
// this node's channels.backup file.
// this node's channel.backup file.
multi, err := ioutil.ReadFile(backupFilePath)
if err != nil {
return nil, err
Expand Down Expand Up @@ -345,15 +345,15 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
mnemonic []string) (nodeRestorer, error) {

// Read the entire Multi backup stored within
// this node's channels.backup file.
// this node's channel.backup file.
multi, err := ioutil.ReadFile(backupFilePath)
if err != nil {
return nil, err
}

// Now that we have Dave's backup file, we'll
// create a new nodeRestorer that will restore
// using the on-disk channels.backup.
// using the on-disk channel.backup.
return chanRestoreViaRPC(
net, password, mnemonic, multi, oldNode,
)
Expand Down Expand Up @@ -405,15 +405,15 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
mnemonic []string) (nodeRestorer, error) {

// Read the entire Multi backup stored within
// this node's channels.backup file.
// this node's channel.backup file.
multi, err := ioutil.ReadFile(backupFilePath)
if err != nil {
return nil, err
}

// Now that we have Dave's backup file, we'll
// create a new nodeRestorer that will restore
// using the on-disk channels.backup.
// using the on-disk channel.backup.
return chanRestoreViaRPC(
net, password, mnemonic, multi, oldNode,
)
Expand Down Expand Up @@ -443,7 +443,7 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
}

// 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.
func testChannelBackupUpdates(net *lntest.NetworkHarness, t *harnessTest) {
ctxb := context.Background()
Expand Down
2 changes: 1 addition & 1 deletion lntest/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ func (hn *HarnessNode) TLSKeyStr() string {
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.
func (hn *HarnessNode) ChanBackupPath() string {
return hn.Cfg.ChanBackupPath()
Expand Down

0 comments on commit f7384a0

Please sign in to comment.