@streamr/dht 100.0.0-testnet-three.4 → 100.0.0-testnet-three.5
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/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamr/dht",
|
|
3
|
-
"version": "100.0.0-testnet-three.
|
|
3
|
+
"version": "100.0.0-testnet-three.5",
|
|
4
4
|
"description": "Streamr Network DHT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@protobuf-ts/runtime": "^2.8.2",
|
|
32
32
|
"@protobuf-ts/runtime-rpc": "^2.8.2",
|
|
33
|
-
"@streamr/autocertifier-client": "100.0.0-testnet-three.
|
|
34
|
-
"@streamr/proto-rpc": "100.0.0-testnet-three.
|
|
35
|
-
"@streamr/utils": "100.0.0-testnet-three.
|
|
33
|
+
"@streamr/autocertifier-client": "100.0.0-testnet-three.5",
|
|
34
|
+
"@streamr/proto-rpc": "100.0.0-testnet-three.5",
|
|
35
|
+
"@streamr/utils": "100.0.0-testnet-three.5",
|
|
36
36
|
"eventemitter3": "^5.0.0",
|
|
37
37
|
"heap": "^0.2.6",
|
|
38
38
|
"ipaddr.js": "^2.0.1",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@streamr/browser-test-runner": "^0.0.1",
|
|
47
|
-
"@streamr/test-utils": "100.0.0-testnet-three.
|
|
47
|
+
"@streamr/test-utils": "100.0.0-testnet-three.5",
|
|
48
48
|
"@types/express": "^4.17.21",
|
|
49
49
|
"@types/heap": "^0.2.34",
|
|
50
50
|
"@types/k-bucket": "^5.0.1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamr/dht",
|
|
3
|
-
"version": "100.0.0-testnet-three.
|
|
3
|
+
"version": "100.0.0-testnet-three.5",
|
|
4
4
|
"description": "Streamr Network DHT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@protobuf-ts/runtime": "^2.8.2",
|
|
32
32
|
"@protobuf-ts/runtime-rpc": "^2.8.2",
|
|
33
|
-
"@streamr/autocertifier-client": "100.0.0-testnet-three.
|
|
34
|
-
"@streamr/proto-rpc": "100.0.0-testnet-three.
|
|
35
|
-
"@streamr/utils": "100.0.0-testnet-three.
|
|
33
|
+
"@streamr/autocertifier-client": "100.0.0-testnet-three.5",
|
|
34
|
+
"@streamr/proto-rpc": "100.0.0-testnet-three.5",
|
|
35
|
+
"@streamr/utils": "100.0.0-testnet-three.5",
|
|
36
36
|
"eventemitter3": "^5.0.0",
|
|
37
37
|
"heap": "^0.2.6",
|
|
38
38
|
"ipaddr.js": "^2.0.1",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@streamr/browser-test-runner": "^0.0.1",
|
|
47
|
-
"@streamr/test-utils": "100.0.0-testnet-three.
|
|
47
|
+
"@streamr/test-utils": "100.0.0-testnet-three.5",
|
|
48
48
|
"@types/express": "^4.17.21",
|
|
49
49
|
"@types/heap": "^0.2.34",
|
|
50
50
|
"@types/k-bucket": "^5.0.1",
|
|
@@ -176,8 +176,8 @@ describe('Route Message With Mock Connections', () => {
|
|
|
176
176
|
oneofKind: 'rpcMessage',
|
|
177
177
|
rpcMessage: closestPeersRequest
|
|
178
178
|
},
|
|
179
|
-
sourceDescriptor: sourceNode.getLocalPeerDescriptor()
|
|
180
|
-
targetDescriptor: destinationNode.getLocalPeerDescriptor()
|
|
179
|
+
sourceDescriptor: sourceNode.getLocalPeerDescriptor(),
|
|
180
|
+
targetDescriptor: destinationNode.getLocalPeerDescriptor()
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
const routeMessageWrapper: RouteMessageWrapper = {
|
|
@@ -207,15 +207,15 @@ describe('Route Message With Mock Connections', () => {
|
|
|
207
207
|
oneofKind: 'rpcMessage',
|
|
208
208
|
rpcMessage
|
|
209
209
|
},
|
|
210
|
-
sourceDescriptor: sourceNode.getLocalPeerDescriptor()
|
|
211
|
-
targetDescriptor: entryPoint.getLocalPeerDescriptor()
|
|
210
|
+
sourceDescriptor: sourceNode.getLocalPeerDescriptor(),
|
|
211
|
+
targetDescriptor: entryPoint.getLocalPeerDescriptor()
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
const forwardedMessage: RouteMessageWrapper = {
|
|
215
215
|
message: requestMessage,
|
|
216
216
|
requestId: v4(),
|
|
217
217
|
sourcePeer: sourceNode.getLocalPeerDescriptor(),
|
|
218
|
-
target: entryPoint.getLocalPeerDescriptor()
|
|
218
|
+
target: entryPoint.getLocalPeerDescriptor().nodeId,
|
|
219
219
|
reachableThrough: [],
|
|
220
220
|
routingPath: [],
|
|
221
221
|
parallelRootNodeIds: []
|
|
@@ -76,14 +76,14 @@ describe('LocalDataStore', () => {
|
|
|
76
76
|
const storedEntry = createMockDataEntry({ creator: creator1 })
|
|
77
77
|
localDataStore.storeEntry(storedEntry)
|
|
78
78
|
const notDeletedData = Array.from(localDataStore.values(getDhtAddressFromRaw(storedEntry.key)))
|
|
79
|
-
expect(notDeletedData[0]
|
|
79
|
+
expect(notDeletedData[0].deleted).toBeFalse()
|
|
80
80
|
const returnValue = localDataStore.markAsDeleted(
|
|
81
81
|
getDhtAddressFromRaw(storedEntry.key),
|
|
82
82
|
creator1
|
|
83
83
|
)
|
|
84
84
|
expect(returnValue).toBe(true)
|
|
85
85
|
const deletedData = Array.from(localDataStore.values(getDhtAddressFromRaw(storedEntry.key)))
|
|
86
|
-
expect(deletedData[0]
|
|
86
|
+
expect(deletedData[0].deleted).toBeTrue()
|
|
87
87
|
})
|
|
88
88
|
|
|
89
89
|
it('data not stored', () => {
|
|
@@ -18,7 +18,7 @@ describe('PeerManager', () => {
|
|
|
18
18
|
manager.addContact(nodeIds.map((n) => ({ nodeId: getRawFromDhtAddress(n), type: NodeType.NODEJS })))
|
|
19
19
|
|
|
20
20
|
const referenceId = createRandomDhtAddress()
|
|
21
|
-
const excluded = new Set<DhtAddress>(sampleSize(nodeIds, 2)
|
|
21
|
+
const excluded = new Set<DhtAddress>(sampleSize(nodeIds, 2))
|
|
22
22
|
const actual = manager.getClosestContactsTo(referenceId, 5, excluded)
|
|
23
23
|
|
|
24
24
|
const expected = sortBy(
|