remove excessive logging

This commit is contained in:
Florian Dold 2021-01-11 00:22:06 +01:00
parent 57d7c988b3
commit 270d84d611
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
3 changed files with 7 additions and 36 deletions

View File

@ -1068,19 +1068,20 @@ export class ExchangeService implements ExchangeServiceInterface {
}
async revokeDenomination(denomPubHash: string) {
if (this.isRunning()) {
throw Error("exchange must be stopped when revoking denominations");
if (!this.isRunning()) {
throw Error("exchange must be running when revoking denominations");
}
await runCommand(
this.globalState,
"exchange-keyup",
"taler-exchange-keyup",
"exchange-offline",
"taler-exchange-offline",
[
"-c",
this.configFilename,
...this.timetravelArgArr,
"--revoke",
"revoke-denomination",
denomPubHash,
"upload",
],
);
}

View File

@ -408,17 +408,12 @@ export class CryptoImplementation {
const planchetsForGammas: RefreshPlanchet[][] = [];
logger.trace("starting RC computation");
for (let i = 0; i < kappa; i++) {
const transferKeyPair = setupRefreshTransferPub(
decodeCrock(refreshSessionSecretSeed),
i,
);
sessionHc.update(transferKeyPair.ecdhePub);
logger.trace(
`HASH transfer_pub ${encodeCrock(transferKeyPair.ecdhePub)}`,
);
transferPrivs.push(encodeCrock(transferKeyPair.ecdhePriv));
transferPubs.push(encodeCrock(transferKeyPair.ecdhePub));
}
@ -427,17 +422,11 @@ export class CryptoImplementation {
for (let i = 0; i < denomSel.count; i++) {
const r = decodeCrock(denomSel.denomPub);
sessionHc.update(r);
logger.trace(`HASH new_coins ${encodeCrock(r)}`);
}
}
sessionHc.update(decodeCrock(meltCoinPub));
logger.trace(`HASH coin_pub ${meltCoinPub}`);
sessionHc.update(amountToBuffer(valueWithFee));
logger.trace(
`HASH melt_amount ${encodeCrock(amountToBuffer(valueWithFee))}`,
);
for (let i = 0; i < kappa; i++) {
const planchets: RefreshPlanchet[] = [];
for (let j = 0; j < newCoinDenoms.length; j++) {
@ -465,26 +454,13 @@ export class CryptoImplementation {
coinEvHash: encodeCrock(hash(ev)),
};
planchets.push(planchet);
logger.trace(
`GENERATE i=${i} coin=${coinNumber} m=${encodeCrock(
pubHash,
)} bf=${encodeCrock(blindingFactor)} dp=${encodeCrock(
denomPub,
)} ev=${encodeCrock(ev)}`,
);
sessionHc.update(ev);
logger.trace(`HASH ev ${encodeCrock(ev)}`);
}
}
planchetsForGammas.push(planchets);
}
const sessionHash = sessionHc.finish();
logger.trace(`RHASH ${encodeCrock(sessionHash)}`);
const confirmData = buildSigPS(SignaturePurpose.WALLET_COIN_MELT)
.put(sessionHash)
.put(decodeCrock(meltCoinDenomPubHash))

View File

@ -524,12 +524,6 @@ export interface BackupTip {
finish_clock?: ClockStamp;
finish_is_failure?: boolean;
finish_info?: {
timestamp: Timestamp;
clock: ClockStamp;
failure: boolean;
};
/**
* The tipped amount.
*/
@ -579,7 +573,7 @@ export enum BackupRefreshReason {
*/
export interface BackupRefreshSession {
/**
* Hased denominations of the newly requested coins.
* Hashed denominations of the newly requested coins.
*/
new_denoms: BackupDenomSel;