wallet-core: logging to diagnose perf/hang issue
This commit is contained in:
parent
bc4964d4ff
commit
da87ce41a6
@ -1558,16 +1558,22 @@ export async function getExchangeWithdrawalInfo(
|
|||||||
instructedAmount: AmountJson,
|
instructedAmount: AmountJson,
|
||||||
ageRestricted: number | undefined,
|
ageRestricted: number | undefined,
|
||||||
): Promise<ExchangeWithdrawalDetails> {
|
): Promise<ExchangeWithdrawalDetails> {
|
||||||
|
logger.trace("updating exchange");
|
||||||
const { exchange, exchangeDetails } =
|
const { exchange, exchangeDetails } =
|
||||||
await ws.exchangeOps.updateExchangeFromUrl(ws, exchangeBaseUrl);
|
await ws.exchangeOps.updateExchangeFromUrl(ws, exchangeBaseUrl);
|
||||||
|
logger.trace("updating withdrawal denoms");
|
||||||
await updateWithdrawalDenoms(ws, exchangeBaseUrl);
|
await updateWithdrawalDenoms(ws, exchangeBaseUrl);
|
||||||
|
logger.trace("getting candidate denoms");
|
||||||
const denoms = await getCandidateWithdrawalDenoms(ws, exchangeBaseUrl);
|
const denoms = await getCandidateWithdrawalDenoms(ws, exchangeBaseUrl);
|
||||||
|
logger.trace("selecting withdrawal denoms");
|
||||||
const selectedDenoms = selectWithdrawalDenominations(
|
const selectedDenoms = selectWithdrawalDenominations(
|
||||||
instructedAmount,
|
instructedAmount,
|
||||||
denoms,
|
denoms,
|
||||||
ws.config.testing.denomselAllowLate,
|
ws.config.testing.denomselAllowLate,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
logger.trace("selection done");
|
||||||
|
|
||||||
if (selectedDenoms.selectedDenoms.length === 0) {
|
if (selectedDenoms.selectedDenoms.length === 0) {
|
||||||
throw Error(
|
throw Error(
|
||||||
`unable to withdraw from ${exchangeBaseUrl}, can't select denominations for instructed amount (${Amounts.stringify(
|
`unable to withdraw from ${exchangeBaseUrl}, can't select denominations for instructed amount (${Amounts.stringify(
|
||||||
@ -1588,6 +1594,8 @@ export async function getExchangeWithdrawalInfo(
|
|||||||
|
|
||||||
let hasDenomWithAgeRestriction = false;
|
let hasDenomWithAgeRestriction = false;
|
||||||
|
|
||||||
|
logger.trace("computing earliest deposit expiration");
|
||||||
|
|
||||||
let earliestDepositExpiration: TalerProtocolTimestamp | undefined;
|
let earliestDepositExpiration: TalerProtocolTimestamp | undefined;
|
||||||
for (let i = 0; i < selectedDenoms.selectedDenoms.length; i++) {
|
for (let i = 0; i < selectedDenoms.selectedDenoms.length; i++) {
|
||||||
const ds = selectedDenoms.selectedDenoms[i];
|
const ds = selectedDenoms.selectedDenoms[i];
|
||||||
|
Loading…
Reference in New Issue
Block a user