lntest: make nobootstrap configurable

This will allow us to test bootstrapping in an itest.
This commit is contained in:
Elle Mouton
2024-11-18 13:42:18 +02:00
parent 38862d3b91
commit 63fbd5fbcb

View File

@@ -148,6 +148,7 @@ type BaseNodeConfig struct {
SkipUnlock bool SkipUnlock bool
Password []byte Password []byte
WithPeerBootstrap bool
P2PPort int P2PPort int
RPCPort int RPCPort int
@@ -285,7 +286,6 @@ func (cfg *BaseNodeConfig) GenArgs() []string {
args = append(args, backendArgs...) args = append(args, backendArgs...)
nodeArgs := []string{ nodeArgs := []string{
"--nobootstrap",
"--debuglevel=debug", "--debuglevel=debug",
"--bitcoin.defaultchanconfs=1", "--bitcoin.defaultchanconfs=1",
"--accept-keysend", "--accept-keysend",
@@ -326,6 +326,10 @@ func (cfg *BaseNodeConfig) GenArgs() []string {
args = append(args, "--noseedbackup") args = append(args, "--noseedbackup")
} }
if !cfg.WithPeerBootstrap {
args = append(args, "--nobootstrap")
}
switch cfg.DBBackend { switch cfg.DBBackend {
case BackendEtcd: case BackendEtcd:
args = append(args, "--db.backend=etcd") args = append(args, "--db.backend=etcd")