lntemp+itest: refactor node restart process
This commit refactors how the node restart is done. It removes the usage of `HasSeed` and replaces it with `SkipUnlock` for clarity.
This commit is contained in:
5 files changed
+80
-67
No files matched your search
@@ -63,8 +63,8 @@ type BaseNodeConfig struct {
|
||||
ReadMacPath string
|
||||
InvoiceMacPath string
|
||||
|
||||
HasSeed bool
|
||||
Password []byte
|
||||
SkipUnlock bool
|
||||
Password []byte
|
||||
|
||||
P2PPort int
|
||||
RPCPort int
|
||||
@@ -190,7 +190,7 @@ func (cfg *BaseNodeConfig) GenArgs() []string {
|
||||
}
|
||||
args = append(args, nodeArgs...)
|
||||
|
||||
if !cfg.HasSeed {
|
||||
if cfg.Password == nil {
|
||||
args = append(args, "--noseedbackup")
|
||||
}
|
||||
|
||||
|
||||
@@ -387,12 +387,12 @@ func (hn *HarnessNode) StartLndCmd(ctxb context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// StartWithSeed will start the lnd process, creates the grpc connection
|
||||
// StartWithNoAuth will start the lnd process, creates the grpc connection
|
||||
// without macaroon auth, and waits until the server is reported as waiting to
|
||||
// start.
|
||||
//
|
||||
// NOTE: caller needs to take extra step to create and unlock the wallet.
|
||||
func (hn *HarnessNode) StartWithSeed(ctxt context.Context) error {
|
||||
func (hn *HarnessNode) StartWithNoAuth(ctxt context.Context) error {
|
||||
// Start lnd process and prepare logs.
|
||||
if err := hn.StartLndCmd(ctxt); err != nil {
|
||||
return fmt.Errorf("start lnd error: %w", err)
|
||||
|
||||
Reference in new issue
Block a user