Skip to content

Commit 0bef104

Browse files
committed
net: enable v2transport by default
1 parent 411ba32 commit 0bef104

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/net.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static constexpr bool DEFAULT_FIXEDSEEDS{true};
9797
static const size_t DEFAULT_MAXRECEIVEBUFFER = 5 * 1000;
9898
static const size_t DEFAULT_MAXSENDBUFFER = 1 * 1000;
9999

100-
static constexpr bool DEFAULT_V2_TRANSPORT{false};
100+
static constexpr bool DEFAULT_V2_TRANSPORT{true};
101101

102102
typedef int64_t NodeId;
103103

test/functional/test_framework/test_node.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,15 @@ def __init__(self, i, datadir_path, *, chain, rpchost, timewait, timeout_factor,
130130
# Default behavior from global -v2transport flag is added to args to persist it over restarts.
131131
# May be overwritten in individual tests, using extra_args.
132132
self.default_to_v2 = v2transport
133-
if self.default_to_v2:
134-
self.args.append("-v2transport=1")
133+
if self.version_is_at_least(260000):
134+
# 26.0 and later support v2transport
135+
if v2transport:
136+
self.args.append("-v2transport=1")
137+
else:
138+
self.args.append("-v2transport=0")
139+
else:
140+
# v2transport requested but not supported for node
141+
assert not v2transport
135142

136143
self.cli = TestNodeCLI(bitcoin_cli, self.datadir_path)
137144
self.use_cli = use_cli

0 commit comments

Comments
 (0)