lntest: allow node restore by extended root key

To allow testing restoring a node from an extended master root key, we
add an extra argument to the RestoreNodeWithSeed function.
This commit is contained in:
Oliver Gugger
2020-10-24 23:18:56 +02:00
parent bbd5980d42
commit 3fd944e7e4
3 changed files with 18 additions and 9 deletions

View File

@@ -122,8 +122,8 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
// obtained above.
return func() (*lntest.HarnessNode, error) {
return net.RestoreNodeWithSeed(
"dave", nil, password,
mnemonic, 1000, backupSnapshot,
"dave", nil, password, mnemonic,
"", 1000, backupSnapshot,
copyPorts(oldNode),
)
}, nil
@@ -159,8 +159,8 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
// restart it again using Unlock.
return func() (*lntest.HarnessNode, error) {
newNode, err := net.RestoreNodeWithSeed(
"dave", nil, password,
mnemonic, 1000, nil,
"dave", nil, password, mnemonic,
"", 1000, nil,
copyPorts(oldNode),
)
if err != nil {
@@ -208,7 +208,8 @@ func testChannelBackupRestore(net *lntest.NetworkHarness, t *harnessTest) {
return func() (*lntest.HarnessNode, error) {
newNode, err := net.RestoreNodeWithSeed(
"dave", nil, password, mnemonic,
1000, nil, copyPorts(oldNode),
"", 1000, nil,
copyPorts(oldNode),
)
if err != nil {
return nil, fmt.Errorf("unable to "+
@@ -1322,7 +1323,7 @@ func chanRestoreViaRPC(net *lntest.NetworkHarness, password []byte,
return func() (*lntest.HarnessNode, error) {
newNode, err := net.RestoreNodeWithSeed(
"dave", nil, password, mnemonic, 1000, nil,
"dave", nil, password, mnemonic, "", 1000, nil,
copyPorts(oldNode),
)
if err != nil {