dev(regtest): prepare 'wait-for-bitcoind' feature #559
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the test branch for joinmarket-webui/jam-docker#76.
Once joinmarket-webui/jam-docker#76 is merged and a new
jam-dev-standalone:master
image has been created, the last commit of this PR will be reverted and this PR can be undrafted.Please do not merge it without reverting the image base for the additional contains from
jam-dev-standalone:wait-for-bitcoind
back tojam-dev-standalone:master
!This PR removes the need for the
READY_FILE
in the secondary JM instance (jm_regtest_joinmarket2
) and relies on theWAIT_FOR_BITCOIND
env var to default totrue
. The tertiary instance (jm_regtest_joinmarket3
) verifies thatWAIT_FOR_BITCOIND
can be disabled and theREADY_FILE
feature continues to work as expected. Please keep in mind that the primary test instance (jm_regtest_joinmarket
) does not use the official "dev"-base image at all!How to test
Build your env environment with
npm run regtest:build
(makes sure new images are pulled) and runnpm run regtest:up
.The environment should start normally as usual.
npm run regtest:init
should be able to create wallets on all instances.You should see the following in the logs:
For
jm_regtest_joinmarket2
(enablingWAIT_FOR_BITCOIND
and not usingREADY_FILE
):For
jm_regtest_joinmarket3
(disablingWAIT_FOR_BITCOIND
and usingREADY_FILE
):You should NOT see
Waiting for bitcoind to accept RPC requests...
forjm_regtest_joinmarket3
.Also, see what happens when
jm_regtest_bitcoind_initializer
mines 99 instead of 101 blocks.Then you should see
getblockchaininfo
calls fromjm_regtest_joinmarket2
every 5 seconds:In case
bitcoind
is not available at all,jm_regtest_joinmarket2
should be "stuck" and wait for it to come up indefinitely: