wallet-core: be less spammy with self-transitions and logging
This commit is contained in:
parent
9c708251f9
commit
26b30a462a
@ -1005,9 +1005,6 @@ export const nativeCryptoR: TalerCryptoInterfaceR = {
|
|||||||
pb.put(hash(stringToBytes(canonicalJson(req.creditRestrictions) + "\0")));
|
pb.put(hash(stringToBytes(canonicalJson(req.creditRestrictions) + "\0")));
|
||||||
}
|
}
|
||||||
const p = pb.build();
|
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)) };
|
return { valid: eddsaVerify(p, decodeCrock(sig), decodeCrock(masterPub)) };
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -371,7 +371,11 @@ async function storePendingTaskPending(
|
|||||||
retryRecord.retryInfo = RetryInfo.increment(retryRecord.retryInfo);
|
retryRecord.retryInfo = RetryInfo.increment(retryRecord.retryInfo);
|
||||||
}
|
}
|
||||||
await tx.operationRetries.put(retryRecord);
|
await tx.operationRetries.put(retryRecord);
|
||||||
|
if (hadError) {
|
||||||
return taskToTransactionNotification(ws, tx, pendingTaskId, undefined);
|
return taskToTransactionNotification(ws, tx, pendingTaskId, undefined);
|
||||||
|
} else {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (maybeNotification) {
|
if (maybeNotification) {
|
||||||
ws.notify(maybeNotification);
|
ws.notify(maybeNotification);
|
||||||
|
@ -134,7 +134,7 @@ export async function downloadExchangeWithTermsOfService(
|
|||||||
timeout: Duration,
|
timeout: Duration,
|
||||||
contentType: string,
|
contentType: string,
|
||||||
): Promise<ExchangeTosDownloadResult> {
|
): Promise<ExchangeTosDownloadResult> {
|
||||||
logger.info(`downloading exchange tos (type ${contentType})`);
|
logger.trace(`downloading exchange tos (type ${contentType})`);
|
||||||
const reqUrl = new URL("terms", exchangeBaseUrl);
|
const reqUrl = new URL("terms", exchangeBaseUrl);
|
||||||
const headers = {
|
const headers = {
|
||||||
Accept: contentType,
|
Accept: contentType,
|
||||||
@ -580,7 +580,7 @@ export async function updateExchangeFromUrlHandler(
|
|||||||
}>
|
}>
|
||||||
> {
|
> {
|
||||||
const forceNow = options.forceNow ?? false;
|
const forceNow = options.forceNow ?? false;
|
||||||
logger.info(
|
logger.trace(
|
||||||
`updating exchange info for ${exchangeBaseUrl}, forced: ${forceNow}`,
|
`updating exchange info for ${exchangeBaseUrl}, forced: ${forceNow}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -628,7 +628,7 @@ export async function updateExchangeFromUrlHandler(
|
|||||||
timeout,
|
timeout,
|
||||||
);
|
);
|
||||||
|
|
||||||
logger.info("validating exchange /wire info");
|
logger.trace("validating exchange /wire info");
|
||||||
|
|
||||||
const version = LibtoolVersion.parseVersion(keysInfo.protocolVersion);
|
const version = LibtoolVersion.parseVersion(keysInfo.protocolVersion);
|
||||||
if (!version) {
|
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,
|
// We download the text/plain version here,
|
||||||
// because that one needs to exist, and we
|
// 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>(
|
const currentDenomSet = new Set<string>(
|
||||||
keysInfo.currentDenominations.map((x) => x.denomPubHash),
|
keysInfo.currentDenominations.map((x) => x.denomPubHash),
|
||||||
);
|
);
|
||||||
|
@ -1175,10 +1175,10 @@ export async function autoRefresh(
|
|||||||
`created refresh group for auto-refresh (${res.refreshGroupId})`,
|
`created refresh group for auto-refresh (${res.refreshGroupId})`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
logger.info(
|
logger.trace(
|
||||||
`current wallet time: ${AbsoluteTime.toIsoString(AbsoluteTime.now())}`,
|
`current wallet time: ${AbsoluteTime.toIsoString(AbsoluteTime.now())}`,
|
||||||
);
|
);
|
||||||
logger.info(
|
logger.trace(
|
||||||
`next refresh check at ${AbsoluteTime.toIsoString(minCheckThreshold)}`,
|
`next refresh check at ${AbsoluteTime.toIsoString(minCheckThreshold)}`,
|
||||||
);
|
);
|
||||||
exchange.nextRefreshCheck =
|
exchange.nextRefreshCheck =
|
||||||
|
@ -1199,14 +1199,14 @@ async function queryReserve(
|
|||||||
);
|
);
|
||||||
reserveUrl.searchParams.set("timeout_ms", "30000");
|
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, {
|
const resp = await ws.http.fetch(reserveUrl.href, {
|
||||||
timeout: getReserveRequestTimeout(withdrawalGroup),
|
timeout: getReserveRequestTimeout(withdrawalGroup),
|
||||||
cancellationToken,
|
cancellationToken,
|
||||||
});
|
});
|
||||||
|
|
||||||
logger.info(`reserve status code: HTTP ${resp.status}`);
|
logger.trace(`reserve status code: HTTP ${resp.status}`);
|
||||||
|
|
||||||
const result = await readSuccessResponseJsonOrErrorCode(
|
const result = await readSuccessResponseJsonOrErrorCode(
|
||||||
resp,
|
resp,
|
||||||
@ -1214,7 +1214,7 @@ async function queryReserve(
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (result.isError) {
|
if (result.isError) {
|
||||||
logger.info(
|
logger.trace(
|
||||||
`got reserve status error, EC=${result.talerErrorResponse.code}`,
|
`got reserve status error, EC=${result.talerErrorResponse.code}`,
|
||||||
);
|
);
|
||||||
if (
|
if (
|
||||||
|
Loading…
Reference in New Issue
Block a user