Page MenuHomePhabricator

[test-seeds] Stop the script if starting bitcoind failed

Authored by jasonbcox on Dec 20 2019, 00:16.



Running while bitcoind is already running spits out an error that bitcoind
doesn't start, but then continues to run. Depending on the configuration of the already-running
node, test-seeds may fail to connect to any nodes at all (which is how I found this bug in the
first place). Worst of all, the script then terminates the node that it did not start.

This patch makes the script bail if it cannot start it's own bitcoind instance (therefore preventing
the accidental killing of any existing bitcoind).

Test Plan

Without this patch: bitcoind is stopped
With this patch: test-seeds bails early and bitcoind is not stopped

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.