From 4ec9f07276abd07726ce8404158c33d6be522d36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hern=C3=A2ni=20Marques?= Date: Thu, 16 Jul 2026 23:14:25 +0200 Subject: [PATCH] fix(monitoring): fresh wallet DB per ladder rung --- scripts/taler-monitoring/check_goa_ladder.sh | 23 +++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/scripts/taler-monitoring/check_goa_ladder.sh b/scripts/taler-monitoring/check_goa_ladder.sh index 91bc43e..954843e 100755 --- a/scripts/taler-monitoring/check_goa_ladder.sh +++ b/scripts/taler-monitoring/check_goa_ladder.sh @@ -207,13 +207,22 @@ ms_tok=$(elapsed_ms "$t0") [ -n "$TOK" ] || { err bank "explorer token failed"; exit 1; } ok "explorer token (${ms_tok}ms)" -# --- wallet exchange + ToS --- +# Fresh wallet DB per rung: without run-until-done the same reserve_pub is reused +# → bank 409 "Reserve pub already used" on later force-selects. +wallet_prepare() { + local label="${1:-wallet}" + WDB="$SCRATCH/wallet-${label}.sqlite3" + export WDB + rm -f "$WDB" + wcli exchanges add "$EX" >"$SCRATCH/ex-add-$label.out" 2>&1 || true + wcli exchanges update "$EX" >"$SCRATCH/ex-upd-$label.out" 2>&1 || true + wcli exchanges accept-tos "$EX" >"$SCRATCH/ex-tos-$label.out" 2>&1 || true +} + t0=$(now_ms) -wcli exchanges add "$EX" >"$SCRATCH/ex-add.out" 2>&1 || true -wcli exchanges update "$EX" >"$SCRATCH/ex-upd.out" 2>&1 || true -wcli exchanges accept-tos "$EX" >"$SCRATCH/ex-tos.out" 2>&1 || true +wallet_prepare "bootstrap" ms_tos=$(elapsed_ms "$t0") -ok "wallet exchange + ToS (${ms_tos}ms)" +ok "wallet exchange + ToS (${ms_tos}ms) — fresh DB per rung (no run-until-done)" LADDER_LIST=$(build_ladder) : "${LADDER_MAX_RUNGS:=99}" @@ -258,6 +267,10 @@ for AMT in "$@"; do note="" status="FAIL" WID="-" + FORCE_SEL_409_LOGGED=0 + + # New wallet sqlite for this rung → unique reserve_pub (avoids bank 5114) + wallet_prepare "r${rung}" # mint from explorer pool t0=$(now_ms)