From 2.3.0, the GUI launches daemon by chia start daemon --skip-keyring instead of chia run_daemon --wait-for-unlock.
On the first GUI run, there is no CHIA_ROOT directory and config files.
chia run_daemon always tries to run chia init on start up while chia start daemon doesn't.
So, on the first run without CHIA_ROOT directory, the new 2.3.0 GUI can never read CHIA_ROOT/config/config.yaml because it won't be created.
This PR let the GUI search for the CHIA_ROOT/config/config.yaml and if it doesn't exist it invokes chia init.
Test
Tested against Ubuntu 22.04 (x64) in cases
(1) with no $CHIA_ROOT/config/config.yaml created yet
(2) with $CHIA_ROOT/config/config.yaml created
The test succeeded. Before this PR, with 2.3.0 and with no config.yaml created, the GUI never proceed from loading screen.
After applying this PR, the GUI proceeds to run.
From
2.3.0
, the GUI launchesdaemon
bychia start daemon --skip-keyring
instead ofchia run_daemon --wait-for-unlock
. On the first GUI run, there is noCHIA_ROOT
directory and config files.chia run_daemon
always tries to runchia init
on start up whilechia start daemon
doesn't. So, on the first run withoutCHIA_ROOT
directory, the new2.3.0
GUI can never readCHIA_ROOT/config/config.yaml
because it won't be created.This PR let the GUI search for the
CHIA_ROOT/config/config.yaml
and if it doesn't exist it invokeschia init
.Test
Tested against Ubuntu 22.04 (x64) in cases (1) with no
$CHIA_ROOT/config/config.yaml
created yet (2) with$CHIA_ROOT/config/config.yaml
createdThe test succeeded. Before this PR, with
2.3.0
and with noconfig.yaml
created, the GUI never proceed from loading screen. After applying this PR, the GUI proceeds to run.