diff --git a/src/net.h b/src/net.h index effa460e517a64..bb10f37e1b41de 100644 --- a/src/net.h +++ b/src/net.h @@ -114,7 +114,7 @@ static const bool DEFAULT_FIXEDSEEDS = true; static const size_t DEFAULT_MAXRECEIVEBUFFER = 5 * 1000; static const size_t DEFAULT_MAXSENDBUFFER = 1 * 1000; -static constexpr bool DEFAULT_V2_TRANSPORT{false}; +static constexpr bool DEFAULT_V2_TRANSPORT{true}; #if defined USE_KQUEUE #define DEFAULT_SOCKETEVENTS "kqueue" diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py index 7080149b5d7a91..93d9bd1497e48e 100755 --- a/test/functional/test_framework/test_node.py +++ b/test/functional/test_framework/test_node.py @@ -128,8 +128,15 @@ def __init__(self, i, datadir, extra_args_from_options, *, chain, rpchost, timew # 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.default_to_v2: - self.args.append("-v2transport=1") + if self.version_is_at_least(260000): + # 26.0 and later support v2transport + if v2transport: + self.args.append("-v2transport=1") + else: + self.args.append("-v2transport=0") + else: + # v2transport requested but not supported for node + assert not v2transport self.cli = TestNodeCLI(bitcoin_cli, self.datadir) self.use_cli = use_cli