From 90899aa2f4c8246977d38e4ee9eee5429f2ee1d2 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 24 Mar 2020 13:03:49 -0400 Subject: [PATCH] start reviewing and removing XXX notes --- lib/commands/pin-rpc.js | 3 ++- lib/compute-index.js | 6 +----- lib/rpc.js | 4 +--- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/commands/pin-rpc.js b/lib/commands/pin-rpc.js index 4aaeb7aaf..cda482d6b 100644 --- a/lib/commands/pin-rpc.js +++ b/lib/commands/pin-rpc.js @@ -547,8 +547,9 @@ const deferResponse = function (Env, channel, cb) { }; */ +// FIXME this will be removed from the client Pinning.isChannelPinned = function (Env, channel, cb) { - return void cb(void 0, true); // XXX + return void cb(void 0, true); /* // if the pins are fully loaded then you can answer yes/no definitively if (Env.pinsLoaded) { diff --git a/lib/compute-index.js b/lib/compute-index.js index 7a146e060..6cf0c3657 100644 --- a/lib/compute-index.js +++ b/lib/compute-index.js @@ -22,11 +22,7 @@ const init = function (config, cb) { }; const tryParse = function (Env, str) { - try { - return JSON.parse(str); - } catch (err) { - // XXX - } + try { return JSON.parse(str); } catch (err) { } }; /* computeIndex diff --git a/lib/rpc.js b/lib/rpc.js index 241f77d41..df9deab8c 100644 --- a/lib/rpc.js +++ b/lib/rpc.js @@ -17,7 +17,7 @@ const UNAUTHENTICATED_CALLS = { GET_FILE_SIZE: Pinning.getFileSize, GET_MULTIPLE_FILE_SIZE: Pinning.getMultipleFileSize, GET_DELETED_PADS: Pinning.getDeletedPads, - IS_CHANNEL_PINNED: Pinning.isChannelPinned, + IS_CHANNEL_PINNED: Pinning.isChannelPinned, // FIXME drop this RPC IS_NEW_CHANNEL: Channel.isNewChannel, WRITE_PRIVATE_MESSAGE: Channel.writePrivateMessage, GET_METADATA: Metadata.getMetadata, @@ -198,8 +198,6 @@ RPC.create = function (Env, cb) { updateLimitDaily(); Env.intervals.dailyLimitUpdate = setInterval(updateLimitDaily, 24*3600*1000); - //Pinning.loadChannelPins(Env); // XXX - // expire old sessions once per minute Env.intervals.sessionExpirationInterval = setInterval(function () { Core.expireSessions(Sessions);