From a34abd748e3ee5009b634771e2674c41435feaa0 Mon Sep 17 00:00:00 2001 From: ansuz Date: Fri, 23 Aug 2019 12:43:42 +0200 Subject: [PATCH] rename unclear variable name --- historyKeeper.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/historyKeeper.js b/historyKeeper.js index 9add76ee6..3572db7c0 100644 --- a/historyKeeper.js +++ b/historyKeeper.js @@ -302,10 +302,8 @@ module.exports.create = function (cfg) { * because the two actions were performed like ABba... * the fix is to use callbacks and implement queueing for writes * to guarantee that offset computation is always atomic with writes - - TODO rename maybeMsgHash to optionalMsgHash */ - const storeMessage = function (ctx, channel, msg, isCp, maybeMsgHash) { + const storeMessage = function (ctx, channel, msg, isCp, optionalMessageHash) { // TODO implement a queue so that we know messages are written in order const msgBin = new Buffer(msg + '\n', 'utf8'); @@ -340,7 +338,7 @@ module.exports.create = function (cfg) { line: ((index.line || 0) + 1) } /*:cp_index_item*/)); } - if (maybeMsgHash) { index.offsetByHash[maybeMsgHash] = index.size; } + if (optionalMessageHash) { index.offsetByHash[optionalMessageHash] = index.size; } index.size += msgBin.length; })); });