gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: wallet-core: be less spammy w


From: gnunet
Subject: [taler-wallet-core] branch master updated: wallet-core: be less spammy with self-transitions and logging
Date: Tue, 20 Jun 2023 15:10:54 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new 26b30a462 wallet-core: be less spammy with self-transitions and logging
26b30a462 is described below

commit 26b30a462ad373d4b5188362ba2e4f6adad0674d
Author: Florian Dold <florian@dold.me>
AuthorDate: Tue Jun 20 15:10:51 2023 +0200

    wallet-core: be less spammy with self-transitions and logging
---
 packages/taler-wallet-core/src/crypto/cryptoImplementation.ts |  3 ---
 packages/taler-wallet-core/src/operations/common.ts           |  6 +++++-
 packages/taler-wallet-core/src/operations/exchanges.ts        | 10 +++++-----
 packages/taler-wallet-core/src/operations/refresh.ts          |  4 ++--
 packages/taler-wallet-core/src/operations/withdraw.ts         |  6 +++---
 5 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts 
b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
index fd2d48398..1dd70304a 100644
--- a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
+++ b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts
@@ -1005,9 +1005,6 @@ export const nativeCryptoR: TalerCryptoInterfaceR = {
       pb.put(hash(stringToBytes(canonicalJson(req.creditRestrictions) + 
"\0")));
     }
     const p = pb.build();
-    logger.info(`wire sig blob: ${encodeCrock(p)}`);
-    logger.info(`credit restrictions: ${j2s(req.creditRestrictions)}`);
-    logger.info(`debit restrictions: ${j2s(req.debitRestrictions)}`);
     return { valid: eddsaVerify(p, decodeCrock(sig), decodeCrock(masterPub)) };
   },
 
diff --git a/packages/taler-wallet-core/src/operations/common.ts 
b/packages/taler-wallet-core/src/operations/common.ts
index 293870a18..37f1a2f22 100644
--- a/packages/taler-wallet-core/src/operations/common.ts
+++ b/packages/taler-wallet-core/src/operations/common.ts
@@ -371,7 +371,11 @@ async function storePendingTaskPending(
       retryRecord.retryInfo = RetryInfo.increment(retryRecord.retryInfo);
     }
     await tx.operationRetries.put(retryRecord);
-    return taskToTransactionNotification(ws, tx, pendingTaskId, undefined);
+    if (hadError) {
+      return taskToTransactionNotification(ws, tx, pendingTaskId, undefined);
+    } else {
+      return undefined;
+    }
   });
   if (maybeNotification) {
     ws.notify(maybeNotification);
diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts 
b/packages/taler-wallet-core/src/operations/exchanges.ts
index 7e01071b4..29c370e2c 100644
--- a/packages/taler-wallet-core/src/operations/exchanges.ts
+++ b/packages/taler-wallet-core/src/operations/exchanges.ts
@@ -134,7 +134,7 @@ export async function downloadExchangeWithTermsOfService(
   timeout: Duration,
   contentType: string,
 ): Promise<ExchangeTosDownloadResult> {
-  logger.info(`downloading exchange tos (type ${contentType})`);
+  logger.trace(`downloading exchange tos (type ${contentType})`);
   const reqUrl = new URL("terms", exchangeBaseUrl);
   const headers = {
     Accept: contentType,
@@ -580,7 +580,7 @@ export async function updateExchangeFromUrlHandler(
   }>
 > {
   const forceNow = options.forceNow ?? false;
-  logger.info(
+  logger.trace(
     `updating exchange info for ${exchangeBaseUrl}, forced: ${forceNow}`,
   );
 
@@ -628,7 +628,7 @@ export async function updateExchangeFromUrlHandler(
     timeout,
   );
 
-  logger.info("validating exchange /wire info");
+  logger.trace("validating exchange /wire info");
 
   const version = LibtoolVersion.parseVersion(keysInfo.protocolVersion);
   if (!version) {
@@ -663,7 +663,7 @@ export async function updateExchangeFromUrlHandler(
     };
   }
 
-  logger.info("finished validating exchange /wire info");
+  logger.trace("finished validating exchange /wire info");
 
   // We download the text/plain version here,
   // because that one needs to exist, and we
@@ -783,7 +783,7 @@ export async function updateExchangeFromUrlHandler(
         });
       }
 
-      logger.info("updating denominations in database");
+      logger.trace("updating denominations in database");
       const currentDenomSet = new Set<string>(
         keysInfo.currentDenominations.map((x) => x.denomPubHash),
       );
diff --git a/packages/taler-wallet-core/src/operations/refresh.ts 
b/packages/taler-wallet-core/src/operations/refresh.ts
index e573ddb44..e00275c8d 100644
--- a/packages/taler-wallet-core/src/operations/refresh.ts
+++ b/packages/taler-wallet-core/src/operations/refresh.ts
@@ -1175,10 +1175,10 @@ export async function autoRefresh(
           `created refresh group for auto-refresh (${res.refreshGroupId})`,
         );
       }
-      logger.info(
+      logger.trace(
         `current wallet time: ${AbsoluteTime.toIsoString(AbsoluteTime.now())}`,
       );
-      logger.info(
+      logger.trace(
         `next refresh check at ${AbsoluteTime.toIsoString(minCheckThreshold)}`,
       );
       exchange.nextRefreshCheck =
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts 
b/packages/taler-wallet-core/src/operations/withdraw.ts
index dd07bdebc..118084197 100644
--- a/packages/taler-wallet-core/src/operations/withdraw.ts
+++ b/packages/taler-wallet-core/src/operations/withdraw.ts
@@ -1199,14 +1199,14 @@ async function queryReserve(
   );
   reserveUrl.searchParams.set("timeout_ms", "30000");
 
-  logger.info(`querying reserve status via ${reserveUrl.href}`);
+  logger.trace(`querying reserve status via ${reserveUrl.href}`);
 
   const resp = await ws.http.fetch(reserveUrl.href, {
     timeout: getReserveRequestTimeout(withdrawalGroup),
     cancellationToken,
   });
 
-  logger.info(`reserve status code: HTTP ${resp.status}`);
+  logger.trace(`reserve status code: HTTP ${resp.status}`);
 
   const result = await readSuccessResponseJsonOrErrorCode(
     resp,
@@ -1214,7 +1214,7 @@ async function queryReserve(
   );
 
   if (result.isError) {
-    logger.info(
+    logger.trace(
       `got reserve status error, EC=${result.talerErrorResponse.code}`,
     );
     if (

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]