From 3846aef8a1ce05fe1722122a7e63ce181ec48c54 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 28 Jun 2018 16:06:12 +0100 Subject: [PATCH] Alter docs, add comments --- src/DecryptionFailureTracker.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/DecryptionFailureTracker.js b/src/DecryptionFailureTracker.js index 58ba1ae8dc..e7809d2f6c 100644 --- a/src/DecryptionFailureTracker.js +++ b/src/DecryptionFailureTracker.js @@ -157,12 +157,15 @@ export default class DecryptionFailureTracker { } /** - * If there is a failure that should be tracked, call the given trackDecryptionFailure - * function with the first failure in the FIFO of failures that should be tracked. + * If there are failures that should be tracked, call the given trackDecryptionFailure + * function with the number of failures that should be tracked. */ trackFailure() { if (this.failuresToTrack.length > 0) { - // Remove all failures, and expose the number of failures + // Remove all failures, and expose the number of failures for now. + // + // TODO: Track a histogram of error types to cardinailty to allow for + // aggregation by error type. this.trackDecryptionFailure(this.failuresToTrack.splice(0).length); } }