Page MenuHomePhabricator

[WEBSITE] Wait for bitcoind to be fully started before fetching the help
ClosedPublic

Authored by Fabien on Sep 2 2020, 22:43.

Details

Summary

The current behavior waits for the PID file to be created, but this is
not always enough. This diff adds a active wait until the RPC interface
is ready.

Test Plan
./scripts/fetch-documentation.sh

Diff Detail

Repository
rABCWEB Bitcoin ABC Website
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Sep 2 2020, 22:43
jasonbcox requested changes to this revision.Sep 2 2020, 22:49
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
scripts/fetch_documentation.sh
115 ↗(On Diff #23219)

The new waiting scheme is robust, so it makes this section redundant. You dont need to track the PID at all. just call bitcoin-cli -regtest stop

This revision now requires changes to proceed.Sep 2 2020, 22:49
Fabien requested review of this revision.Sep 2 2020, 22:51
Fabien added inline comments.
scripts/fetch_documentation.sh
115 ↗(On Diff #23219)

That won't work:

  • this will stop your node, while you want to extract the RPCs
  • you can't use the $! to get the PID when you run bitcoind with -daemon
  • you want -daemon to avoid bloating the logs
scripts/fetch_documentation.sh
115 ↗(On Diff #23219)

Last point: I want to kill and not stop to allow the loop for running fast. With stop there is no guarantee that the node will be stopped on next loop iteration

Fabien planned changes to this revision.Sep 2 2020, 22:59

I misunderstood the comment, now fixed

This revision is now accepted and ready to land.Sep 2 2020, 23:13