From 6049073c69ed2622bb60053e60e01553c15f34a4 Mon Sep 17 00:00:00 2001 From: jangko Date: Wed, 28 Apr 2021 22:13:50 +0700 Subject: [PATCH] fixes nimbus.sh script for hive integration related to graphql - add `chain.rlp` import code - add --graphql and --graphqlbind to enable graphql service --- hive_integration/nimbus/nimbus.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hive_integration/nimbus/nimbus.sh b/hive_integration/nimbus/nimbus.sh index d59d52a58..78d55063f 100644 --- a/hive_integration/nimbus/nimbus.sh +++ b/hive_integration/nimbus/nimbus.sh @@ -65,6 +65,14 @@ cat genesis.json # Don't immediately abort, some imports are meant to fail set +e +# Load the test chain if present +echo "Loading initial blockchain..." +if [ -f /chain.rlp ]; then + $nimbus $FLAGS --import:/chain.rlp +else + echo "Warning: chain.rlp not found." +fi + # Load the remainder of the test chain echo "Loading remaining individual blocks..." if [ -d /blocks ]; then @@ -76,7 +84,11 @@ fi set -e # Configure RPC. -FLAGS="$FLAGS --rpc --rpcapi:eth,debug --rpcbind:0.0.0.0:8545" +if [ "$HIVE_GRAPHQL_ENABLED" != "" ]; then + FLAGS="$FLAGS --graphql --graphqlbind:0.0.0.0:8545" +else + FLAGS="$FLAGS --rpc --rpcapi:eth,debug --rpcbind:0.0.0.0:8545" +fi echo "Running nimbus with flags $FLAGS" $nimbus $FLAGS