summaryrefslogtreecommitdiff
path: root/src/crypto
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-08-18 23:06:27 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-08-18 23:06:27 +0200
commitd4021a9d17c23a897850be275397cdfc71ee4523 (patch)
tree268c05d4438c52cddfa4af770eb0f97914a55315 /src/crypto
parent23e72ce25cb5f7eede60281b499f527554db2185 (diff)
downloadwallet-core-d4021a9d17c23a897850be275397cdfc71ee4523.tar.gz
wallet-core-d4021a9d17c23a897850be275397cdfc71ee4523.tar.bz2
wallet-core-d4021a9d17c23a897850be275397cdfc71ee4523.zip
slightly more sane logging
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/browserWorkerEntry.ts2
-rw-r--r--src/crypto/cryptoApi.ts10
-rw-r--r--src/crypto/synchronousWorker.ts2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/crypto/browserWorkerEntry.ts b/src/crypto/browserWorkerEntry.ts
index 3df59fe0d..d133e93cc 100644
--- a/src/crypto/browserWorkerEntry.ts
+++ b/src/crypto/browserWorkerEntry.ts
@@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License along with
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
- */
+*/
/**
* Web worker for crypto operations.
diff --git a/src/crypto/cryptoApi.ts b/src/crypto/cryptoApi.ts
index a4e12c00f..46fe2576e 100644
--- a/src/crypto/cryptoApi.ts
+++ b/src/crypto/cryptoApi.ts
@@ -140,7 +140,7 @@ export class CryptoApi {
*/
private stopped: boolean = false;
- public enableTracing = true;
+ static enableTracing = false;
/**
* Terminate all worker threads.
@@ -148,7 +148,7 @@ export class CryptoApi {
terminateWorkers() {
for (let worker of this.workers) {
if (worker.w) {
- this.enableTracing && console.log("terminating worker");
+ CryptoApi.enableTracing && console.log("terminating worker");
worker.w.terminate();
if (worker.terminationTimerHandle) {
worker.terminationTimerHandle.clear();
@@ -173,7 +173,7 @@ export class CryptoApi {
*/
wake(ws: WorkerState, work: WorkItem): void {
if (this.stopped) {
- this.enableTracing && console.log("not waking, as cryptoApi is stopped");
+ CryptoApi.enableTracing && console.log("not waking, as cryptoApi is stopped");
return;
}
if (ws.currentWorkItem !== null) {
@@ -268,7 +268,7 @@ export class CryptoApi {
return;
}
- this.enableTracing &&
+ CryptoApi.enableTracing &&
console.log(
`rpc ${currentWorkItem.operation} took ${timer.performanceNow() -
currentWorkItem.startTime}ms`,
@@ -299,7 +299,7 @@ export class CryptoApi {
priority: number,
...args: any[]
): Promise<T> {
- this.enableTracing && console.log("cryptoApi: doRpc called");
+ CryptoApi.enableTracing && console.log("cryptoApi: doRpc called");
const p: Promise<T> = new Promise<T>((resolve, reject) => {
const rpcId = this.nextRpcId++;
const workItem: WorkItem = {
diff --git a/src/crypto/synchronousWorker.ts b/src/crypto/synchronousWorker.ts
index 4369612ad..b697c8e16 100644
--- a/src/crypto/synchronousWorker.ts
+++ b/src/crypto/synchronousWorker.ts
@@ -131,6 +131,6 @@ export class SynchronousCryptoWorker {
* Forcibly terminate the worker thread.
*/
terminate() {
- console.log("terminating synchronous worker (no-op)");
+ // This is a no-op.
}
}