cashless2ecash

cashless2ecash: pay with cards for digital cash (experimental)
Log | Files | Refs | README

commit 7120f4c2cb7c70bcc81e6333fc11f5baa1e0ae12
parent 499732be4922e5b4a3706a6e319f547f2985ea5b
Author: Joel-Haeberli <haebu@rubigen.ch>
Date:   Sun,  2 Jun 2024 12:52:42 +0200

fix: wire-gateway start bug

Diffstat:
Mc2ec/db-postgres.go | 3++-
Mc2ec/proc-retrier.go | 2+-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/c2ec/db-postgres.go b/c2ec/db-postgres.go @@ -93,7 +93,6 @@ const PS_UPDATE_TRANSFER = "UPDATE " + TRANSFER_TABLE_NAME + " SET (" + const PS_CONFIRMED_TRANSACTIONS_ASC = "SELECT * FROM " + WITHDRAWAL_TABLE_NAME + " WHERE " + WITHDRAWAL_FIELD_NAME_STATUS + "='" + string(CONFIRMED) + "'" + - " AND " + WITHDRAWAL_FIELD_NAME_TS + ">=$3" + " ORDER BY " + WITHDRAWAL_FIELD_NAME_ID + " ASC" + " LIMIT $1" + " OFFSET $2" @@ -515,6 +514,8 @@ func (db *C2ECPostgres) GetConfirmedWithdrawals(start int, delta int, since time } } + LogInfo("postgres", fmt.Sprintf("selected query=%s (for parameters delta=%d, start=%d, since=%d)", query, delta, start, since.Unix())) + limit := math.Abs(float64(delta)) offset := start if delta < 0 { diff --git a/c2ec/proc-retrier.go b/c2ec/proc-retrier.go @@ -31,7 +31,7 @@ func RunRetrier(ctx context.Context, errs chan error) { continue } if lastlog.Before(time.Now().Add(time.Second * -30)) { - LogInfo("proc-retrier", fmt.Sprintf("attesting selected withdrawals. found %d ready for confirmation", len(withdrawals))) + LogInfo("proc-retrier", fmt.Sprintf("retrier confirming 'selected' withdrawals. found %d ready for confirmation", len(withdrawals))) lastlog = time.Now() } for _, w := range withdrawals {