enforce asynchrony in 'gethistoryOffset'

pull/1/head
ansuz 5 years ago
parent e80a81a2bb
commit bc034d95a3

@ -436,7 +436,8 @@ const storeMessage = function (Env, channel, msg, isCp, optionalMessageHash) {
* -1 if you didn't find it * -1 if you didn't find it
*/ */
const getHistoryOffset = (Env, channelName, lastKnownHash, cb) => { const getHistoryOffset = (Env, channelName, lastKnownHash, _cb) => {
const cb = Util.once(Util.mkAsync(_cb));
const store = Env.store; const store = Env.store;
const Log = Env.Log; const Log = Env.Log;

Loading…
Cancel
Save