Repository: bitcoin/bitcoin
File: test/functional/test_framework/test_node.py (Python)

Code before:
        self.chain = chain
        self.rpchost = rpchost
        self.rpc_timeout = timewait
        self.binary = bitcoind
        self.coverage_dir = coverage_dir
        self.cwd = cwd
        self.descriptors = descriptors
        if extra_conf is not None:
            append_config(self.datadir_path, extra_conf)
        # Most callers will just need to add extra args to the standard list below.
        # For those callers that need more flexibility, they can just set the args property directly.
        # Note that common args are set in the config file (see initialize_datadir)
        self.extra_args = extra_args
        self.version = version
        # Configuration for logging is set as command-line args rather than in the bitcoin.conf file.
        # This means that starting a bitcoind using the temp dir to debug a failed test won't
        # spam debug.log.
        self.args = [
            self.binary,
            f"-datadir={self.datadir_path}",
            "-logtimemicros",
            "-debug",
            "-debugexclude=libevent",
            "-debugexclude=leveldb",
            "-debugexclude=rand",
            "-uacomment=testnode%d" % i,
        ]
        if self.descriptors is None:
            self.args.append("-disablewallet")

        # Use valgrind, expect for previous release binaries
        if use_valgrind and version is None:
            default_suppressions_file = Path(__file__).parents[3] / "contrib" / "valgrind.supp"
            suppressions_file = os.getenv("VALGRIND_SUPPRESSIONS_FILE",
                                          default_suppressions_file)
            self.args = ["valgrind", "--suppressions={}".format(suppressions_file),
                         "--gen-suppressions=all", "--exit-on-first-error=yes",
                         "--error-exitcode=1", "--quiet"] + self.args

        if self.version_is_at_least(190000):
            self.args.append("-logthreadnames")
        if self.version_is_at_least(219900):
            self.args.append("-logsourcelocations")
        if self.version_is_at_least(239000):
            self.args.append("-loglevel=trace")

        # Default behavior from global -v2transport flag is added to args to persist it over restarts.
        # May be overwritten in individual tests, using extra_args.
        self.default_to_v2 = v2transport
        if self.version_is_at_least(260000):
            # 26.0 and later support v2transport

Review comment (suggestion):
```suggestion
            f"-uacomment=testnode{i}",  # required for subversion uniqueness across peers
```

style-nit, if you retouch

Code after:
        self.chain = chain
        self.rpchost = rpchost
        self.rpc_timeout = timewait
        self.binary = bitcoind
        self.coverage_dir = coverage_dir
        self.cwd = cwd
        self.descriptors = descriptors
        if extra_conf is not None:
            append_config(self.datadir_path, extra_conf)
        # Most callers will just need to add extra args to the standard list below.
        # For those callers that need more flexibility, they can just set the args property directly.
        # Note that common args are set in the config file (see initialize_datadir)
        self.extra_args = extra_args
        self.version = version
        # Configuration for logging is set as command-line args rather than in the bitcoin.conf file.
        # This means that starting a bitcoind using the temp dir to debug a failed test won't
        # spam debug.log.
        self.args = [
            self.binary,
            f"-datadir={self.datadir_path}",
            "-logtimemicros",
            "-debug",
            "-debugexclude=libevent",
            "-debugexclude=leveldb",
            "-debugexclude=rand",
            "-uacomment=testnode%d" % i,  # required for subversion uniqueness across peers
        ]
        if self.descriptors is None:
            self.args.append("-disablewallet")

        # Use valgrind, expect for previous release binaries
        if use_valgrind and version is None:
            default_suppressions_file = Path(__file__).parents[3] / "contrib" / "valgrind.supp"
            suppressions_file = os.getenv("VALGRIND_SUPPRESSIONS_FILE",
                                          default_suppressions_file)
            self.args = ["valgrind", "--suppressions={}".format(suppressions_file),
                         "--gen-suppressions=all", "--exit-on-first-error=yes",
                         "--error-exitcode=1", "--quiet"] + self.args

        if self.version_is_at_least(190000):
            self.args.append("-logthreadnames")
        if self.version_is_at_least(219900):
            self.args.append("-logsourcelocations")
        if self.version_is_at_least(239000):
            self.args.append("-loglevel=trace")

        # Default behavior from global -v2transport flag is added to args to persist it over restarts.
        # May be overwritten in individual tests, using extra_args.
        self.default_to_v2 = v2transport
        if self.version_is_at_least(260000):
            # 26.0 and later support v2transport