I often want to run RPC command(s) as soon as I've started bitcoind.
This lets me do that without annoying sleeps or grepping debug.log; e.g.
bitcoin-cli -rpcwait getinfo
I often want to run RPC command(s) as soon as I've started bitcoind.
This lets me do that without annoying sleeps or grepping debug.log; e.g.
bitcoin-cli -rpcwait getinfo
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/480e75ceabdf83438023d066ed494c371fcef239 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
252 | @@ -253,6 +253,7 @@ bool static Bind(const CService &addr, unsigned int flags) { 253 | if (hmm == HMM_BITCOIND || hmm == HMM_BITCOIN_CLI) 254 | { 255 | strUsage += " -rpcconnect=<ip> " + _("Send commands to node running on <ip> (default: 127.0.0.1)") + "\n"; 256 | + strUsage += " -rpcwait " + _("Wait for RPC server to start") + "\n";
Maybe "Wait for RPC server to be available"
ACK
Merging because I need this now for some regression tests I'm writing.
I still think the proposed description would be somewhat better, as it doesn't only wait for start, but also when the server becomes unreachable for other reasons. Oh well...