mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-13 13:55:45 +00:00
fixes nimbus hive client code
This commit is contained in:
parent
a923016a12
commit
9823b3d132
@ -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
|
||||
|
@ -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(
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user