diff --git a/test/functional/rpc_net.py b/test/functional/rpc_net.py index 01334e2d57d..0501befe0fe 100755 --- a/test/functional/rpc_net.py +++ b/test/functional/rpc_net.py @@ -185,7 +185,8 @@ class NetTest(BitcoinTestFramework): self.nodes[0].setnetworkactive(state=False) assert_equal(self.nodes[0].getnetworkinfo()['networkactive'], False) # Wait a bit for all sockets to close - self.wait_until(lambda: self.nodes[0].getnetworkinfo()['connections'] == 0, timeout=3) + for n in self.nodes: + self.wait_until(lambda: n.getnetworkinfo()['connections'] == 0, timeout=3) with self.nodes[0].assert_debug_log(expected_msgs=['SetNetworkActive: true\n']): self.nodes[0].setnetworkactive(state=True)