clear historyKeeper cache when we trim a channel

This commit is contained in:
ansuz 2020-02-03 17:14:42 -05:00
parent 43307ffb1a
commit 65ba85d97b
1 changed files with 2 additions and 3 deletions

View File

@ -105,9 +105,8 @@ Channel.removeOwnedChannelHistory = function (Env, channelId, unsafeKey, hash, c
}).nThen(function () {
Env.msgStore.trimChannel(channelId, hash, function (err) {
if (err) { return void cb(err); }
// XXX you must also clear the channel's index from historyKeeper cache
// clear historyKeeper's cache for this channel
Env.historyKeeper.channelClose(channelId);
});
});
};