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 committed 2021-08-24 10:37:33 +02:00
1 parent bbd5980d42
commit 3fd944e7e4
3 files changed
+18 -9

No files matched your search

+2 -1
View File
@@ -426,7 +426,7 @@ func (n *NetworkHarness) newNodeWithSeed(name string, extraArgs []string,
// will finish initializing the LightningClient such that the HarnessNode can
// be used for regular rpc operations.
func (n *NetworkHarness) RestoreNodeWithSeed(name string, extraArgs []string,
password []byte, mnemonic []string, recoveryWindow int32,
password []byte, mnemonic []string, rootKey string, recoveryWindow int32,
chanBackups *lnrpc.ChanBackupSnapshot,
opts ...NodeOption) (*HarnessNode, error) {
@@ -441,6 +441,7 @@ func (n *NetworkHarness) RestoreNodeWithSeed(name string, extraArgs []string,
WalletPassword: password,
CipherSeedMnemonic: mnemonic,
AezeedPassphrase: password,
ExtendedMasterKey: rootKey,
RecoveryWindow: recoveryWindow,
ChannelBackups: chanBackups,
}