blind-peer 2.8.1 → 2.8.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.
- package/index.js +3 -2
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -426,10 +426,11 @@ class BlindPeer extends ReadyResource {
|
|
|
426
426
|
record.announce = false
|
|
427
427
|
}
|
|
428
428
|
|
|
429
|
-
// We only add it to the db the first time
|
|
429
|
+
// We only add it to the db the first time, except if announce changed
|
|
430
430
|
// Note: not race condition safe, but it's no problem if we do add the same core twice
|
|
431
431
|
const existing = await this.db.getCoreRecord(record.key)
|
|
432
|
-
|
|
432
|
+
const upgradeToAnnounce = existing && !existing.announce && record.announce
|
|
433
|
+
if (!existing || upgradeToAnnounce) {
|
|
433
434
|
this.db.addCore(record)
|
|
434
435
|
await this.flush() // flush now as important data
|
|
435
436
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blind-peer",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.2",
|
|
4
4
|
"description": "Blind peers help keep hypercores available",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"tiny-byte-size": "^1.1.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"blind-peering": "^1.
|
|
36
|
+
"blind-peering": "^1.13.0",
|
|
37
37
|
"brittle": "^3.7.0",
|
|
38
38
|
"debounceify": "^1.1.0",
|
|
39
39
|
"hyperdht": "^6.20.1",
|