Skip to content

Commit

Permalink
saving perId and account as well
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan6sha committed Nov 2, 2023
1 parent a76aa24 commit 535d552
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docker/env_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
export ARCH_SUPPORT="linux/arm64"

export DOCKER_REPO="functionland"
export DEFAULT_FX_TAG="test113"
export DEFAULT_FULA_TAG="test113"
export DEFAULT_NODE_TAG="test113"
export DEFAULT_FX_TAG="test114"
export DEFAULT_FULA_TAG="test114"
export DEFAULT_NODE_TAG="test114"

#build fxsupport
export FX_SUPPORT_IMAGE="$DOCKER_REPO/fxsupport"
Expand Down
10 changes: 10 additions & 0 deletions docker/sugarfunge-node/run_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ if [ ! -f "/internal/.secrets/node_key.txt" ] || [ "$blox_seed_changed" -ne 0 ];
echo "$output"
node_key=$(echo "$output" | tr ' ' '\n' | tail -n 1)
echo "$node_key" > /internal/.secrets/node_key.txt

# Extract the first line from node_peerid.txt
node_peerid=$(echo "$output" | head -n 1)
echo "$node_peerid" > /internal/.secrets/node_peerid.txt
fi

# create Aura and Grandpa keys
Expand All @@ -50,6 +54,12 @@ if [ ! -f "/internal/.secrets/secret_phrase.txt" ] || [ ! -f "/internal/.secrets
if [ ! -f "/internal/.secrets/secret_seed.txt" ] || [ "$secret_seed" != "$(cat /internal/.secrets/secret_seed.txt)" ]; then
echo "$secret_seed" > /internal/.secrets/secret_seed.txt
fi

# Extract the SS58 Address using awk and trim any extra spaces
account=$(echo "$output" | grep "SS58 Address:" | awk '{$1=$2=""; print $0}' | sed 's/^[ \t]*//;s/[ \t]*$//')
if [ ! -f "/internal/.secrets/account.txt" ] || [ "$account" != "$(cat /internal/.secrets/account.txt)" ]; then
echo "$account" > /internal/.secrets/account.txt
fi
fi

# create grandpa account
Expand Down

0 comments on commit 535d552

Please sign in to comment.