Fix load-keystore-secrets.sh to prevent duplicate entries
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled

- Clear env file at start to avoid appending duplicates when script runs multiple times
- Fixes issue where proposer_id was repeated many times in /run/aitbc/secrets/.env
- This was causing unwanted block production on follower nodes
This commit is contained in:
aitbc
2026-05-26 16:20:16 +02:00
parent fd75eb32bc
commit 9ec53892bc

View File

@@ -14,6 +14,9 @@ chmod 700 "$RUN_DIR"
# Create .env file from credentials # Create .env file from credentials
ENV_FILE="$RUN_DIR/.env" ENV_FILE="$RUN_DIR/.env"
# Clear existing file to avoid duplicate entries
> "$ENV_FILE"
if [ -f "$CREDENTIALS_DIR/api_hash_secret" ]; then if [ -f "$CREDENTIALS_DIR/api_hash_secret" ]; then
echo "API_KEY_HASH_SECRET=$(cat $CREDENTIALS_DIR/api_hash_secret)" >> "$ENV_FILE" echo "API_KEY_HASH_SECRET=$(cat $CREDENTIALS_DIR/api_hash_secret)" >> "$ENV_FILE"
fi fi