HomePhabricator

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

Description

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

Summary:
Running test-seeds.sh 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:

bitcoind
test-seeds.sh

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

Reviewers: #bitcoin_abc, deadalnix, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D4781

Details

Provenance
jasonbcoxAuthored on Dec 20 2019, 00:10
jasonbcoxPushed on Dec 20 2019, 16:40
Reviewer
Restricted Project
Differential Revision
D4781: [test-seeds] Stop the script if starting bitcoind failed
Parents
rABCa55d080374f7: Update seeds
Branches
Unknown
Tags
Unknown