Skip to content

Commit 57dd5e7

Browse files
committed
[Tests][Refactor] Move connect_nodes_bi to p2p_time_offset
1 parent 9b36468 commit 57dd5e7

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

test/functional/p2p_time_offset.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@
88
from test_framework.test_framework import PivxTestFramework
99
from test_framework.util import (
1010
assert_equal,
11-
connect_nodes_bi,
12-
set_node_times
11+
connect_nodes,
12+
set_node_times,
1313
)
1414

15+
def connect_nodes_bi(nodes, a, b):
16+
connect_nodes(nodes[a], b)
17+
connect_nodes(nodes[b], a)
18+
1519
class TimeOffsetTest(PivxTestFramework):
1620
def set_test_params(self):
1721
self.setup_clean_chain = True

test/functional/test_framework/util.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,15 +361,12 @@ def connect_nodes(from_connection, node_num):
361361
# with transaction relaying
362362
wait_until(lambda: all(peer['version'] != 0 for peer in from_connection.getpeerinfo()))
363363

364-
def connect_nodes_bi(nodes, a, b):
365-
connect_nodes(nodes[a], b)
366-
connect_nodes(nodes[b], a)
367-
368364
def connect_nodes_clique(nodes):
369365
l = len(nodes)
370366
for a in range(l):
371367
for b in range(a, l):
372-
connect_nodes_bi(nodes, a, b)
368+
connect_nodes(nodes[a], b)
369+
connect_nodes(nodes[b], a)
373370

374371
def sync_blocks(rpc_connections, *, wait=1, timeout=60):
375372
"""

0 commit comments

Comments
 (0)