enable auditor in generate-XXX-basedb scripts

This commit is contained in:
Christian Grothoff 2020-12-16 13:23:41 +01:00
parent cffefb0b63
commit 6d820228b6
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
3 changed files with 20 additions and 6 deletions

View File

@ -86,6 +86,11 @@ MERCHANT_URL=http://localhost:${MERCHANT_PORT}/
BANK_PORT=`taler-config -c $CONF -s BANK -o HTTP_PORT`
BANK_URL=http://localhost:${BANK_PORT}/
AUDITOR_URL=http://localhost:8083/
AUDITOR_PRIV_FILE=`taler-config -f -c $CONF -s AUDITOR -o AUDITOR_PRIV_FILE`
AUDITOR_PRIV_DIR=`dirname $AUDITOR_PRIV_FILE`
mkdir -p $AUDITOR_PRIV_DIR
gnunet-ecc -g1 $AUDITOR_PRIV_FILE > /dev/null
AUDITOR_PUB=`gnunet-ecc -p $AUDITOR_PRIV_FILE`
# patch configuration
taler-config -c $CONF -s exchange -o MASTER_PUBLIC_KEY -V $MASTER_PUB
@ -156,11 +161,11 @@ then
fi
echo " DONE"
echo -n "Setting up keys"
taler-exchange-offline -c $CONF \
download sign \
enable-account payto://x-taler-bank/localhost/2 \
enable-auditor $AUDITOR_PUB $AUDITOR_URL "TESTKUDOS Auditor" \
wire-fee now x-taler-bank TESTKUDOS:0.01 TESTKUDOS:0.01 \
upload &> taler-exchange-offline.log
@ -211,7 +216,7 @@ taler-wallet-cli --no-throttle --wallet-db=$WALLET_DB api 'runIntegrationTest' \
--arg MERCHANT_URL "$MERCHANT_URL" \
--arg EXCHANGE_URL "$EXCHANGE_URL" \
--arg BANK_URL "$BANK_URL"
)"
)" &> taler-wallet-cli.log
echo "Shutting down services"
@ -223,8 +228,6 @@ pg_dump -O $TARGET_DB | sed -e '/AS integer/d' > ${BASEDB}.sql
echo $MASTER_PUB > ${BASEDB}.mpub
WIRE_FEE_DIR=`taler-config -c $CONF -f -s exchangedb -o WIREFEE_BASE_DIR`
cp $WIRE_FEE_DIR/x-taler-bank.fee ${BASEDB}.fees
date +%s > ${BASEDB}.age
# clean up

View File

@ -72,6 +72,8 @@ export MERCHANT_URL=http://localhost:${MERCHANT_PORT}/
BANK_PORT=`taler-config -c $CONF -s BANK -o HTTP_PORT`
export BANK_URL=http://localhost:${BANK_PORT}/
export AUDITOR_URL=http://localhost:8083/
AUDITOR_PRIV_FILE=`taler-config -f -c $CONF -s AUDITOR -o AUDITOR_PRIV_FILE`
AUDITOR_PUB=`gnunet-ecc -p $AUDITOR_PRIV_FILE`
# patch configuration
taler-config -c $CONF -s exchange -o MASTER_PUBLIC_KEY -V $MASTER_PUB
@ -151,6 +153,7 @@ echo -n "Setting up keys"
taler-exchange-offline -c $CONF \
download sign \
enable-account payto://x-taler-bank/localhost/2 \
enable-auditor $AUDITOR_PUB $AUDITOR_URL "TESTKUDOS Auditor" \
wire-fee now x-taler-bank TESTKUDOS:0.01 TESTKUDOS:0.01 \
upload &> taler-exchange-offline.log

View File

@ -369,7 +369,7 @@ await_read_ready (struct TALER_CRYPTO_DenominationHelper *dh)
};
sigset_t sigmask;
struct timespec ts = {
.tv_sec = 5
.tv_sec = 1
};
int ret;
@ -412,7 +412,15 @@ TALER_CRYPTO_helper_denom_poll (struct TALER_CRYPTO_DenominationHelper *dh)
if (dh->synced)
break;
if (! await_read_ready (dh))
break; /* timeout */
{
/* timeout AND not synced => full reconnect */
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Restarting connection to helper, did not come up properly\n");
do_disconnect (dh);
try_connect (dh);
if (-1 == dh->sock)
return; /* give up */
}
continue; /* try again */
}
GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING,