core-3nweb-client-lib 0.50.1 → 0.50.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -161,8 +161,14 @@ async function makePeersKeyring(keyringFS, localFS, random, logger) {
161
161
  });
162
162
  }
163
163
  const entryToLog = keysDB.getSendingPair(peerCAddr);
164
- await keysDB.saveIfNeeded();
165
- await logs.recordGettingCryptoFromPeer(entryToLog, peerAddr);
164
+ if (entryToLog) {
165
+ await keysDB.saveIfNeeded();
166
+ await logs.recordGettingCryptoFromPeer(entryToLog, peerAddr);
167
+ }
168
+ else {
169
+ // XXX we see code come here. sql not recording? why?
170
+ logger.logError(`Suggested sending pair somehow didn't get into db within this absorbNextPairSuggestedByPeer()`);
171
+ }
166
172
  }
167
173
  async function periodicCheckAndUploadOfData() {
168
174
  if (logs.numOfLogs() >= NUM_OF_LOGS_TO_START_CUT) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-3nweb-client-lib",
3
- "version": "0.50.1",
3
+ "version": "0.50.2",
4
4
  "description": "3NWeb client core library, embeddable into different environments",
5
5
  "main": "build/lib-index.js",
6
6
  "types": "build/lib-index.d.ts",