Skip to content

Commit 6440e61

Browse files
committed
qa: Drop RPC connection if --usecli
1 parent 5029e94 commit 6440e61

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/functional/test_framework/test_node.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,15 @@ def wait_for_rpc_connection(self):
209209
raise FailedToStartError(self._node_msg(
210210
'bitcoind exited with status {} during initialization'.format(self.process.returncode)))
211211
try:
212-
self.rpc = get_rpc_proxy(rpc_url(self.datadir, self.index, self.rpchost), self.index, timeout=self.rpc_timeout, coveragedir=self.coverage_dir)
213-
self.rpc.getblockcount()
212+
rpc = get_rpc_proxy(rpc_url(self.datadir, self.index, self.rpchost), self.index, timeout=self.rpc_timeout, coveragedir=self.coverage_dir)
213+
rpc.getblockcount()
214214
# If the call to getblockcount() succeeds then the RPC connection is up
215+
self.log.debug("RPC successfully started")
216+
if self.use_cli:
217+
return
218+
self.rpc = rpc
215219
self.rpc_connected = True
216220
self.url = self.rpc.url
217-
self.log.debug("RPC successfully started")
218221
return
219222
except IOError as e:
220223
if e.errno != errno.ECONNREFUSED: # Port not yet open?

0 commit comments

Comments
 (0)