fixes nimbus.sh script for hive integration related to graphql

- add `chain.rlp` import code
- add --graphql and --graphqlbind to enable graphql service
This commit is contained in:
jangko 2021-04-28 22:13:50 +07:00
parent 68e70ebdca
commit 6049073c69
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 13 additions and 1 deletions

View File

@ -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