diff options
author | Pieter Wuille <pieter@wuille.net> | 2024-01-29 14:12:14 -0500 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2024-01-29 22:48:01 -0500 |
commit | 0bef1042ce6c459acb1de965cbccd98867a417f1 (patch) | |
tree | 2a5681aa7939e317e0d2d9e43870c6a6fa221f91 | |
parent | 411ba32af21a56efa0a570b6aa8bf8f035410230 (diff) |
net: enable v2transport by default
-rw-r--r-- | src/net.h | 2 | ||||
-rwxr-xr-x | test/functional/test_framework/test_node.py | 11 |
2 files changed, 10 insertions, 3 deletions
@@ -97,7 +97,7 @@ static constexpr 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}; typedef int64_t NodeId; diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py index 58956a95f7..838dcba141 100755 --- a/test/functional/test_framework/test_node.py +++ b/test/functional/test_framework/test_node.py @@ -130,8 +130,15 @@ class TestNode(): # 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_path) self.use_cli = use_cli |