aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/auditor/generate-auditor-basedb.sh11
-rwxr-xr-xsrc/auditor/generate-revoke-basedb.sh3
-rw-r--r--src/util/crypto_helper_denom.c12
3 files changed, 20 insertions, 6 deletions
diff --git a/src/auditor/generate-auditor-basedb.sh b/src/auditor/generate-auditor-basedb.sh
index b934785f5..d15668c18 100755
--- a/src/auditor/generate-auditor-basedb.sh
+++ b/src/auditor/generate-auditor-basedb.sh
@@ -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
diff --git a/src/auditor/generate-revoke-basedb.sh b/src/auditor/generate-revoke-basedb.sh
index cb48f524d..0e997acab 100755
--- a/src/auditor/generate-revoke-basedb.sh
+++ b/src/auditor/generate-revoke-basedb.sh
@@ -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
diff --git a/src/util/crypto_helper_denom.c b/src/util/crypto_helper_denom.c
index 7326f70ff..c61a46f1d 100644
--- a/src/util/crypto_helper_denom.c
+++ b/src/util/crypto_helper_denom.c
@@ -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,