Skip to content

Commit 529b9e9

Browse files
committed
merge bitcoin#28253: display abrupt shutdown errors in console output
1 parent f3719b3 commit 529b9e9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/functional/test_framework/test_node.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,13 @@ def wait_for_rpc_connection(self):
259259
poll_per_s = 4
260260
for _ in range(poll_per_s * self.rpc_timeout):
261261
if self.process.poll() is not None:
262+
# Attach abrupt shutdown error/s to the exception message
263+
self.stderr.seek(0)
264+
str_error = ''.join(line.decode('utf-8') for line in self.stderr)
265+
str_error += "************************\n" if str_error else ''
266+
262267
raise FailedToStartError(self._node_msg(
263-
'dashd exited with status {} during initialization'.format(self.process.returncode)))
268+
f'dashd exited with status {self.process.returncode} during initialization. {str_error}'))
264269
try:
265270
rpc = get_rpc_proxy(
266271
rpc_url(self.datadir, self.index, self.chain, self.rpchost),

0 commit comments

Comments
 (0)