hypercore 11.18.1 → 11.18.3
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 +1 -3
- package/lib/fully-remote-proof.js +1 -3
- package/lib/inspect.js +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -30,8 +30,6 @@ const {
|
|
|
30
30
|
DECODING_ERROR
|
|
31
31
|
} = require('hypercore-errors')
|
|
32
32
|
|
|
33
|
-
const inspectSymbol = Symbol.for('nodejs.util.inspect.custom')
|
|
34
|
-
|
|
35
33
|
// Hypercore actually does not have any notion of max/min block sizes
|
|
36
34
|
// but we enforce 15mb to ensure smooth replication (each block is transmitted atomically)
|
|
37
35
|
const MAX_SUGGESTED_BLOCK_SIZE = 15 * 1024 * 1024
|
|
@@ -97,7 +95,7 @@ class Hypercore extends EventEmitter {
|
|
|
97
95
|
this.on('newListener', maybeAddMonitor)
|
|
98
96
|
}
|
|
99
97
|
|
|
100
|
-
[
|
|
98
|
+
[Symbol.for('nodejs.util.inspect.custom')](depth, opts) {
|
|
101
99
|
return inspect(this, depth, opts)
|
|
102
100
|
}
|
|
103
101
|
|
|
@@ -101,13 +101,11 @@ async function verify(storage, buffer, { referrer = null } = {}) {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
async function proof(sender, { index, block = null } = {}) {
|
|
104
|
-
const
|
|
104
|
+
const proof = await sender.proof({
|
|
105
105
|
block: block ? { index, nodes: 0 } : null,
|
|
106
106
|
upgrade: { start: 0, length: sender.length }
|
|
107
107
|
})
|
|
108
108
|
|
|
109
|
-
const proof = await treeProof.settle()
|
|
110
|
-
|
|
111
109
|
if (block) proof.block.value = block
|
|
112
110
|
proof.manifest = sender.core.header.manifest
|
|
113
111
|
|
package/lib/inspect.js
CHANGED
|
@@ -41,7 +41,7 @@ module.exports = function (core, depth, opts) {
|
|
|
41
41
|
`${indent} sessions: [ ${opts.stylize(core.sessions.length, 'number')} ]\n` +
|
|
42
42
|
`${indent} activeRequests: [ ${opts.stylize(core.activeRequests.length, 'number')} ]\n` +
|
|
43
43
|
`${indent} peers: ${peers}\n` +
|
|
44
|
-
`${indent})
|
|
44
|
+
`${indent})`
|
|
45
45
|
)
|
|
46
46
|
}
|
|
47
47
|
|