message: Added relaunching node with new or changed command line parameters. GH
diff: +import copy
  import decimal
  import subprocess
  import time
  @@ -992,7 +993,7 @@ class Node(object):
  # TBD: make nodeId an internal property
  # pylint: disable=too-many-locals
  - def relaunch(self, nodeId, chainArg, newChain=False, timeout=Utils.systemWaitTimeout):
  + def relaunch(self, nodeId, chainArg, newChain=False, timeout=Utils.systemWaitTimeout, addOrSwapFlags=None):
  assert(self.pid is None)
  assert(self.killed)
  @@ -1001,8 +1002,10 @@ class Node(object):
  cmdArr=[]
  myCmd=self.cmd
  + toAddOrSwap=copy.deepcopy(addOrSwapFlags) if addOrSwapFlags is not None else {}
  if not newChain:
  skip=False
  + swapValue=None
  for i in self.cmd.split():
  Utils.Print("\"%s\"" % (i))
  if skip:
  @@ -1012,7 +1015,19 @@ class Node(object):
  skip=True
  continue
  + if swapValue is None:
  cmdArr.append(i)
  + else:
  + cmdArr.append(swapValue)
  + swapValue=None
  +
  + if i in toAddOrSwap:
  + swapValue=toAddOrSwap[i]
  + del toAddOrSwap[i]
  + for k,v in toAddOrSwap.items():
  + cmdArr.append(k)
  + cmdArr.append(v)
  +
  myCmd=" ".join(cmdArr)
  dataDir="var/lib/node_%02d" % (nodeId)
  @@ -1044,5 +1059,6 @@ class Node(object):
  self.pid=None
  return False
  + self.cmd=cmd
  self.killed=False
  return True
  