Updates for stage2 setup #60

Merged
nabarun merged 5 commits from pm-update-init into main 2024-10-22 09:54:34 +00:00
4 changed files with 11 additions and 6 deletions

View File

@ -19,7 +19,7 @@ FROM ubuntu:22.04
# Install ca-certificates, jq, curl, bash, and other necessary packages # Install ca-certificates, jq, curl, bash, and other necessary packages
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \ ca-certificates \
jq curl netcat bash \ jq curl netcat bash bc \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Copy over binary from the builder # Copy over binary from the builder

View File

@ -10,7 +10,7 @@ LOGLEVEL=${LOGLEVEL:-"info"}
input_genesis_file=${GENESIS_FILE} input_genesis_file=${GENESIS_FILE}
if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data" ]; then
# validate dependencies are installed # validate dependencies are installed
command -v jq > /dev/null 2>&1 || { command -v jq > /dev/null 2>&1 || {
echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/" echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"
@ -30,7 +30,7 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
# if $KEY exists it should be deleted # if $KEY exists it should be deleted
laconicd keys add $KEY --keyring-backend $KEYRING laconicd keys add $KEY --keyring-backend $KEYRING
# Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer) # Set moniker and chain-id
laconicd init $MONIKER --chain-id $CHAINID --default-denom $DENOM laconicd init $MONIKER --chain-id $CHAINID --default-denom $DENOM
if [[ -f ${input_genesis_file} ]]; then if [[ -f ${input_genesis_file} ]]; then

View File

@ -53,9 +53,9 @@ func GetCmdCommitBid() *cobra.Command {
if chainId == "" { if chainId == "" {
// Take from config if not provided // Take from config if not provided
chainId = clientCtx.ChainID chainId = clientCtx.ChainID
if chainId == "" { }
return fmt.Errorf("--chain-id required") if chainId == "" {
} return fmt.Errorf("--chain-id required")
} }
bidAmount, err := sdk.ParseCoinNormalized(args[1]) bidAmount, err := sdk.ParseCoinNormalized(args[1])

View File

@ -30,6 +30,11 @@ func (k *Keeper) InitGenesis(ctx sdk.Context, data *registry.GenesisState) error
return err return err
} }
} }
readableRecord := record.ToReadableRecord()
if err := k.processAttributes(ctx, readableRecord.Attributes, record.Id); err != nil {
return err
}
} }
for _, authority := range data.Authorities { for _, authority := range data.Authorities {