@@ -49,7 +49,7 @@ type NetworkHarness struct {
49
49
LNDHarness * lntest.HarnessTest
50
50
51
51
// server is an instance of the local Loop/Pool mock server.
52
- server * serverHarness
52
+ server * ServerHarness
53
53
54
54
// BackendCfg houses the information necessary to use a node as LND
55
55
// chain backend, such as rpc configuration, P2P information etc.
@@ -130,8 +130,8 @@ func (n *NetworkHarness) SetUp(t *testing.T,
130
130
mockServerAddr := fmt .Sprintf (
131
131
node .ListenerFormat , node .NextAvailablePort (),
132
132
)
133
- n .server = newServerHarness (mockServerAddr )
134
- err := n .server .start ()
133
+ n .server = NewServerHarness (mockServerAddr )
134
+ err := n .server .Start ()
135
135
require .NoError (t , err )
136
136
137
137
// Start a mock autopilot server.
@@ -273,10 +273,10 @@ func (n *NetworkHarness) NewNode(t *testing.T, name string, extraArgs []string,
273
273
remoteMode bool , wait bool ) (* HarnessNode , error ) {
274
274
275
275
litArgs := []string {
276
- fmt .Sprintf ("--loop.server.host=%s" , n .server .serverHost ),
277
- fmt .Sprintf ("--loop.server.tlspath=%s" , n .server .certFile ),
278
- fmt .Sprintf ("--pool.auctionserver=%s" , n .server .serverHost ),
279
- fmt .Sprintf ("--pool.tlspathauctserver=%s" , n .server .certFile ),
276
+ fmt .Sprintf ("--loop.server.host=%s" , n .server .ServerHost ),
277
+ fmt .Sprintf ("--loop.server.tlspath=%s" , n .server .CertFile ),
278
+ fmt .Sprintf ("--pool.auctionserver=%s" , n .server .ServerHost ),
279
+ fmt .Sprintf ("--pool.tlspathauctserver=%s" , n .server .CertFile ),
280
280
"--autopilot.insecure" ,
281
281
fmt .Sprintf (
282
282
"--autopilot.address=localhost:%d" ,
@@ -315,7 +315,7 @@ func (n *NetworkHarness) newNode(t *testing.T, name string, extraArgs,
315
315
RemoteMode : remoteMode ,
316
316
}
317
317
318
- node , err := newNode (t , cfg , n )
318
+ node , err := NewNode (t , cfg , n . LNDHarness )
319
319
if err != nil {
320
320
return nil , err
321
321
}
@@ -326,7 +326,7 @@ func (n *NetworkHarness) newNode(t *testing.T, name string, extraArgs,
326
326
n .activeNodes [node .NodeID ] = node
327
327
n .mtx .Unlock ()
328
328
329
- err = node .start (n .litdBinary , n .lndErrorChan , wait )
329
+ err = node .Start (n .litdBinary , n .lndErrorChan , wait )
330
330
if err != nil {
331
331
return nil , err
332
332
}
@@ -649,7 +649,7 @@ func (n *NetworkHarness) RestartNode(node *HarnessNode, callback func() error,
649
649
func (n * NetworkHarness ) RestartNodeNoUnlock (node * HarnessNode ,
650
650
callback func () error , wait bool , litArgOpts ... LitArgOption ) error {
651
651
652
- if err := node .stop (); err != nil {
652
+ if err := node .Stop (); err != nil {
653
653
return err
654
654
}
655
655
@@ -659,18 +659,18 @@ func (n *NetworkHarness) RestartNodeNoUnlock(node *HarnessNode,
659
659
}
660
660
}
661
661
662
- return node .start (n .litdBinary , n .lndErrorChan , wait , litArgOpts ... )
662
+ return node .Start (n .litdBinary , n .lndErrorChan , wait , litArgOpts ... )
663
663
}
664
664
665
665
// SuspendNode stops the given node and returns a callback that can be used to
666
666
// start it again.
667
667
func (n * NetworkHarness ) SuspendNode (node * HarnessNode ) (func () error , error ) {
668
- if err := node .stop (); err != nil {
668
+ if err := node .Stop (); err != nil {
669
669
return nil , err
670
670
}
671
671
672
672
restart := func () error {
673
- return node .start (n .litdBinary , n .lndErrorChan , true )
673
+ return node .Start (n .litdBinary , n .lndErrorChan , true )
674
674
}
675
675
676
676
return restart , nil
@@ -701,7 +701,7 @@ func (n *NetworkHarness) KillNode(node *HarnessNode) error {
701
701
// This can be used to temporarily bring a node down during a test, to be later
702
702
// started up again.
703
703
func (n * NetworkHarness ) StopNode (node * HarnessNode ) error {
704
- return node .stop ()
704
+ return node .Stop ()
705
705
}
706
706
707
707
// OpenChannel attempts to open a channel between srcNode and destNode with the
0 commit comments