func (n *nodeConfig) args() []string {
	args := []string{}
	if n.listen != "" {
		args = append(args, fmt.Sprintf("--listen=%s", n.listen))
	}
	if n.rpclisten != "" {
		args = append(args, fmt.Sprintf("--rpclisten=%s", n.rpclisten))
	}
	if n.rpcuser != "" {
		args = append(args, fmt.Sprintf("--rpcuser=%s", n.rpcuser))
	}
	if n.rpcpass != "" {
		args = append(args, fmt.Sprintf("--rpcpass=%s", n.rpcpass))
	}
	if n.homeDir != "" {
		args = append(args, fmt.Sprintf("--appdata=%s", n.homeDir))
	}
	if n.dataDir != "" {
		args = append(args, fmt.Sprintf("--datadir=%s", n.dataDir))
	}
	if n.logDir != "" {
		args = append(args, fmt.Sprintf("--logdir=%s", n.logDir))
	}
	args = append(args, n.extraArgs...)
	return args
}
args return the arguments list build from the nodeConfig
which be used to launch the qitmeer node
package testutils
import (
	"bufio"
	"fmt"
	"github.com/Qitmeer/qitmeer/params"
	"github.com/Qitmeer/qitmeer/rpc"
	"io"
	"os"
	"os/exec"
	"path/filepath"
	"sync"
	"testing"
)
type nodeConfig struct {
	program   string
	listen    string
	rpclisten string
	rpcuser   string
	rpcpass   string
	rpcnotls  bool
	homeDir   string
	dataDir   string
	logDir    string
	keyFile   string
	certFile  string
	extraArgs []string
}
func newNodeConfig(homeDir string, extraArgs []string) *nodeConfig {
	c := &nodeConfig{
		program:   "qitmeer",
		listen:    "127.0.0.1:" + params.PrivNetParam.DefaultPort,  
		rpclisten: "127.0.0.1:" + params.PrivNetParam.RpcPort,      
		rpcuser:   "testuser",
		rpcpass:   "testpass",
		rpcnotls:  true,
		homeDir:   homeDir,
		dataDir:   filepath.Join(homeDir, "data"),
		logDir:    filepath.Join(homeDir, "log"),
		keyFile:   filepath.Join(homeDir, "rpc.key"),
		certFile:  filepath.Join(homeDir, "rpc.cert"),
		extraArgs: extraArgs,
	}
	return c
}