We would formerly wait a definite number of seconds for the cookie file
to appear. But this approach presents a fundamental issue: how long is
enough before we can be reasonably sure bitcoind will never start?
For instance on mainnet the checks performed at startup could take more
than the 3 seconds we would previously wait for. If it does we would
have incorrectly errored and let bitcoind run in the background.
Instead, assume bitcoind would exit if it errors. Until it does so,
continue polling for the cookie file. This approach also presents
drawbacks (for instance what if bitcoind is performing a very long
operation before creating the cookie file?), but the former approach
wouldn't be an acceptable solution in this case either. And the new one
is preferable as its failure scenario seems much less probable.
During installation, the user may choose for Liana to configure and start bitcoind for them.
This internal bitcoind uses as its data directory the `bitcoind_datadir` folder within the
Liana data directory.
If the internal bitcoind option has been selected for a network, it will be automatically
started when the user returns to Liana and stopped when Liana is closed.