Update init script to use existing genesis file (#47)
All checks were successful
Integration Tests / test-integration (push) Successful in 3m10s
E2E Tests / test-e2e (push) Successful in 3m55s
Unit Tests / test-unit (push) Successful in 2m1s
SDK Tests / sdk_tests (push) Successful in 10m27s
SDK Tests / sdk_tests_auctions (push) Successful in 14m19s
SDK Tests / sdk_tests_nameservice_expiry (push) Successful in 7m13s
All checks were successful
Integration Tests / test-integration (push) Successful in 3m10s
E2E Tests / test-e2e (push) Successful in 3m55s
Unit Tests / test-unit (push) Successful in 2m1s
SDK Tests / sdk_tests (push) Successful in 10m27s
SDK Tests / sdk_tests_auctions (push) Successful in 14m19s
SDK Tests / sdk_tests_nameservice_expiry (push) Successful in 7m13s
Part of [laconicd testnet validator enrollment](https://www.notion.so/laconicd-testnet-validator-enrollment-6fc1d3cafcc64fef8c5ed3affa27c675) Co-authored-by: Adw8 <adwaitgharpure@gmail.com> Reviewed-on: #47
This commit is contained in:
parent
c162396298
commit
5e7d5fc47c
@ -25,6 +25,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
# Copy over binary from the builder
|
||||
COPY --from=builder /go/src/git.vdb.to/cerc-io/laconicd/build/laconicd /usr/bin/laconicd
|
||||
|
||||
# Copy over init script from builder
|
||||
COPY --from=builder /go/src/git.vdb.to/cerc-io/laconicd/scripts/init.sh scripts/init.sh
|
||||
|
||||
WORKDIR /
|
||||
|
||||
# Run laconicd by default
|
||||
|
@ -6,6 +6,8 @@ MONIKER="localtestnet"
|
||||
KEYRING="test"
|
||||
LOGLEVEL="${LOGLEVEL:-info}"
|
||||
|
||||
input_genesis_file=${GENESIS_FILE}
|
||||
|
||||
if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
||||
# validate dependencies are installed
|
||||
command -v jq > /dev/null 2>&1 || {
|
||||
@ -29,6 +31,11 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
||||
# Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer)
|
||||
laconicd init $MONIKER --chain-id $CHAINID --default-denom alnt
|
||||
|
||||
if [ -f ${input_genesis_file} ]; then
|
||||
# Use provided genesis config
|
||||
cp $input_genesis_file $HOME/.laconicd/config/genesis.json
|
||||
fi
|
||||
|
||||
update_genesis() {
|
||||
jq "$1" $HOME/.laconicd/config/genesis.json > $HOME/.laconicd/config/tmp_genesis.json &&
|
||||
mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
|
Loading…
Reference in New Issue
Block a user