From 4bff32232c61bbc344bb410094fdb6bb34a9b5c9 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Thu, 22 Feb 2018 14:27:24 -0800 Subject: [PATCH] lntest/node: adds SetExtraArgs to change node behavior after restart --- lntest/node.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lntest/node.go b/lntest/node.go index add5d8fe..7420a153 100644 --- a/lntest/node.go +++ b/lntest/node.go @@ -395,6 +395,12 @@ func (hn *HarnessNode) connectRPC() (*grpc.ClientConn, error) { return grpc.Dial(hn.cfg.RPCAddr(), opts...) } +// SetExtraArgs assigns the ExtraArgs field for the node's configuration. The +// changes will take effect on restart. +func (hn *HarnessNode) SetExtraArgs(extraArgs []string) { + hn.cfg.ExtraArgs = extraArgs +} + // cleanup cleans up all the temporary files created by the node's process. func (hn *HarnessNode) cleanup() error { return os.RemoveAll(hn.cfg.BaseDir)