fixes nimbus hive client code

This commit is contained in:
andri lim 2021-03-31 14:22:30 +07:00 committed by jangko
parent a923016a12
commit 9823b3d132
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
3 changed files with 15 additions and 4 deletions

View File

@ -29,6 +29,8 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY --from=build /usr/bin/nimbus /usr/bin/nimbus
RUN usr/bin/nimbus -v > /version.txt
# Inject the startup script
ADD nimbus.sh /nimbus.sh
ADD mapper.jq /mapper.jq

View File

@ -1,3 +1,12 @@
def walk(f):
. as $in
| if type == "object" then
reduce keys_unsorted[] as $key
( {}; . + { ($key): ($in[$key] | walk(f)) } ) | f
elif type == "array" then map( walk(f) ) | f
else f
end;
# Removes all empty keys and values in input.
def remove_empty:
. | walk(

View File

@ -50,7 +50,7 @@ nimbus=/usr/bin/nimbus
FLAGS="--prune:archive"
if [ "$HIVE_LOGLEVEL" != "" ]; then
FLAGS="$FLAGS --log-level:$HIVE_LOGLEVEL"
FLAGS="$FLAGS --log-level:DEBUG"
fi
# Configure the chain.
@ -59,16 +59,16 @@ jq -f /mapper.jq /genesis-input.json > /genesis.json
# Dump genesis
echo "Supplied genesis state:"
cat /genesis.json
F-LAGS="$FLAGS --customgenesis:genesis.json"
FLAGS="$FLAGS --customnetwork:/genesis.json"
cat genesis.json
# Don't immediately abort, some imports are meant to fail
set +e
# Load the remainder of the test chain
echo "Loading remaining individual blocks..."
if [ -d /blocks ]; then
(cd /blocks && $nimbus $FLAGS --log-level:$HIVE_LOGLEVEL --import:`ls | sort -n`)
(cd /blocks && cat `ls | sort -n` > blocks.rlp && $nimbus $FLAGS --import:blocks.rlp)
else
echo "Warning: blocks folder not found."
fi