From ce6e840e03101031f29e3ec31dca05a71332ed0e Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Thu, 25 Oct 2018 17:55:50 -0700 Subject: [PATCH] fix: block until the JSON RPC API is available --- web3.js/bin/localnet.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web3.js/bin/localnet.sh b/web3.js/bin/localnet.sh index e525e6fcc9..d2a0e58a86 100755 --- a/web3.js/bin/localnet.sh +++ b/web3.js/bin/localnet.sh @@ -75,6 +75,13 @@ up) --env RUST_LOG="$RUST_LOG" \ solanalabs/solana:"$channel" + curl \ + --retry 10 \ + --retry-connrefused \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","id":1, "method":"getTransactionCount"}' \ + http://localhost:8899 ) ;; down)