File tree Expand file tree Collapse file tree 2 files changed +29
-4
lines changed
Expand file tree Collapse file tree 2 files changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ LEDGER_ARCHIVE="ledger.tar"
3636DB_DIR=" db"
3737LEDGER_DIR=" ledger"
3838
39+ CURRENT_USER=$( whoami)
40+ POSTGRES_USER=" $CURRENT_USER "
41+ POSTGRES_PASSWORD=" "
42+ POSTGRES_DB=" archive"
43+ POSTGRES_HOST=" localhost"
44+
3945# Function to display usage
4046usage () {
4147 cat << EOF
@@ -48,6 +54,10 @@ Required parameters:
4854
4955Optional parameters:
5056 --postgres-port PORT PostgreSQL server port (default: $POSTGRES_PORT )
57+ --postgres-user USER PostgreSQL user (default: $POSTGRES_USER )
58+ --postgres-password PASS PostgreSQL password (default: empty)
59+ --postgres-db DB PostgreSQL database name (default: $POSTGRES_DB )
60+ --postgres-host HOST PostgreSQL host (default: $POSTGRES_HOST )
5161 --port-base PORT Base port number for services (default: $PORT_BASE )
5262 --num-blocks N Number of blocks to generate (default: $NUM_BLOCKS )
5363 --num-zkapp-txs N Number of zkApp transactions (default: $NUM_ZKAPP_TXS )
@@ -71,6 +81,22 @@ while [[ $# -gt 0 ]]; do
7181 POSTGRES_PORT=" $2 "
7282 shift 2
7383 ;;
84+ --postgres-user)
85+ POSTGRES_USER=" $2 "
86+ shift 2
87+ ;;
88+ --postgres-password)
89+ POSTGRES_PASSWORD=" $2 "
90+ shift 2
91+ ;;
92+ --postgres-db)
93+ POSTGRES_DB=" $2 "
94+ shift 2
95+ ;;
96+ --postgres-host)
97+ POSTGRES_HOST=" $2 "
98+ shift 2
99+ ;;
74100 --port-base)
75101 PORT_BASE=" $2 "
76102 shift 2
@@ -182,8 +208,7 @@ if [[ ! -x "$ROSETTA_EXE" ]]; then
182208fi
183209
184210# Get current username for postgres URI
185- CURRENT_USER=$( whoami)
186- POSTGRES_URI=" postgres://$CURRENT_USER @localhost:$POSTGRES_PORT /archive"
211+ POSTGRES_URI=" postgres://$POSTGRES_USER :$POSTGRES_PASSWORD @$POSTGRES_HOST :$POSTGRES_PORT /$POSTGRES_DB "
187212
188213# PID for postgres cleanup
189214POSTGRES_PID=" "
Original file line number Diff line number Diff line change @@ -289,7 +289,7 @@ cp -R "$LEDGER_DIR/ledgers/" genesis
289289mkdir -p tmp
290290
291291echo " Running warmup mina advanced test submit-to-archive (1 block, 1 payment, 0 zkapp)..."
292- TMP=tmp MINA_PRIVKEY_PASS=" $MINA_EXE " advanced test submit-to-archive \
292+ TMP=tmp MINA_PRIVKEY_PASS=" " " $MINA_EXE " advanced test submit-to-archive \
293293 --archive-node-port " $ARCHIVE_PORT " \
294294 --config-file " $LEDGER_DIR /runtime_config.json" \
295295 --privkey-path " $LEDGER_DIR /plain1" \
@@ -320,7 +320,7 @@ echo ""
320320# Run main submit-to-archive test
321321echo " [Main Test] Submitting blocks to archive..."
322322echo " Running mina advanced test submit-to-archive..."
323- TMP=tmp MINA_PRIVKEY_PASS=" $MINA_EXE " advanced test submit-to-archive \
323+ TMP=tmp MINA_PRIVKEY_PASS=" " " $MINA_EXE " advanced test submit-to-archive \
324324 --archive-node-port " $ARCHIVE_PORT " \
325325 --config-file " $LEDGER_DIR /runtime_config.json" \
326326 --privkey-path " $LEDGER_DIR /plain1" \
You can’t perform that action at this time.
0 commit comments