Skip to content

Commit fafa003

Browse files
author
MarcoFalke
committed
qa: Remove never used return value of sync_with_ping
1 parent fa9de37 commit fafa003

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

test/functional/p2p-acceptblock.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ def run_test(self):
103103
test_node.send_message(msg_block(blocks_h2[0]))
104104
white_node.send_message(msg_block(blocks_h2[1]))
105105

106-
[ x.sync_with_ping() for x in [test_node, white_node] ]
106+
for x in [test_node, white_node]:
107+
x.sync_with_ping()
107108
assert_equal(self.nodes[0].getblockcount(), 2)
108109
assert_equal(self.nodes[1].getblockcount(), 2)
109110
self.log.info("First height 2 block accepted by both nodes")
@@ -116,7 +117,8 @@ def run_test(self):
116117
test_node.send_message(msg_block(blocks_h2f[0]))
117118
white_node.send_message(msg_block(blocks_h2f[1]))
118119

119-
[ x.sync_with_ping() for x in [test_node, white_node] ]
120+
for x in [test_node, white_node]:
121+
x.sync_with_ping()
120122
for x in self.nodes[0].getchaintips():
121123
if x['hash'] == blocks_h2f[0].hash:
122124
assert_equal(x['status'], "headers-only")
@@ -135,7 +137,8 @@ def run_test(self):
135137
test_node.send_message(msg_block(blocks_h3[0]))
136138
white_node.send_message(msg_block(blocks_h3[1]))
137139

138-
[ x.sync_with_ping() for x in [test_node, white_node] ]
140+
for x in [test_node, white_node]:
141+
x.sync_with_ping()
139142
# Since the earlier block was not processed by node0, the new block
140143
# can't be fully validated.
141144
for x in self.nodes[0].getchaintips():

test/functional/test_framework/mininode.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1615,7 +1615,6 @@ def sync_with_ping(self, timeout=60):
16151615
test_function = lambda: self.last_message.get("pong") and self.last_message["pong"].nonce == self.ping_counter
16161616
wait_until(test_function, timeout=timeout, lock=mininode_lock)
16171617
self.ping_counter += 1
1618-
return True
16191618

16201619
# The actual NodeConn class
16211620
# This class provides an interface for a p2p connection to a specified node

0 commit comments

Comments
 (0)