@@ -2,7 +2,6 @@ import type { DB, DBTransaction } from '@matrixai/db';
2
2
import type NodeConnectionManager from './NodeConnectionManager' ;
3
3
import type NodeGraph from './NodeGraph' ;
4
4
import type KeyRing from '../keys/KeyRing' ;
5
- import type CertManager from '../keys/CertManager' ;
6
5
import type Sigchain from '../sigchain/Sigchain' ;
7
6
import type {
8
7
NodeId ,
@@ -22,7 +21,6 @@ import type GestaltGraph from '../gestalts/GestaltGraph';
22
21
import type { TaskHandler , TaskHandlerId , Task } from '../tasks/types' ;
23
22
import type { ContextTimed } from '@matrixai/contexts' ;
24
23
import type { PromiseCancellable } from '@matrixai/async-cancellable' ;
25
- import type { ContextTimedInput } from '@matrixai/contexts/dist/types' ;
26
24
import type { Host , Port } from '../network/types' ;
27
25
import type { SignedTokenEncoded } from '../tokens/types' ;
28
26
import type { ClaimLinkNode } from '../claims/payloads/index' ;
@@ -31,6 +29,7 @@ import type {
31
29
AgentRPCRequestParams ,
32
30
AgentRPCResponseResult ,
33
31
} from '../agent/types' ;
32
+ import type { ContextTimedInput } from '@matrixai/contexts/dist/types' ;
34
33
import Logger from '@matrixai/logger' ;
35
34
import { StartStop , ready } from '@matrixai/async-init/dist/StartStop' ;
36
35
import { Semaphore , Lock } from '@matrixai/async-locks' ;
@@ -43,7 +42,6 @@ import * as claimsUtils from '../claims/utils';
43
42
import * as tasksErrors from '../tasks/errors' ;
44
43
import * as claimsErrors from '../claims/errors' ;
45
44
import * as keysUtils from '../keys/utils' ;
46
- import * as keysEvents from '../keys/events' ;
47
45
import { never , promise } from '../utils/utils' ;
48
46
import {
49
47
decodeClaimId ,
@@ -62,7 +60,6 @@ class NodeManager {
62
60
protected logger : Logger ;
63
61
protected sigchain : Sigchain ;
64
62
protected keyRing : KeyRing ;
65
- protected certManager ?: CertManager ;
66
63
protected nodeConnectionManager : NodeConnectionManager ;
67
64
protected nodeGraph : NodeGraph ;
68
65
protected taskManager : TaskManager ;
@@ -213,10 +210,6 @@ class NodeManager {
213
210
) ;
214
211
} ;
215
212
216
- protected handleEventsCertManagerCertChange = async ( ) => {
217
- await this . resetBuckets ( ) ;
218
- } ;
219
-
220
213
constructor ( {
221
214
db,
222
215
keyRing,
@@ -225,7 +218,6 @@ class NodeManager {
225
218
nodeGraph,
226
219
taskManager,
227
220
gestaltGraph,
228
- certManager,
229
221
refreshBucketDelay = 3600000 , // 1 hour in milliseconds
230
222
refreshBucketDelayJitter = 0.5 , // Multiple of refreshBucketDelay to jitter by
231
223
retrySeedConnectionsDelay = 120000 , // 2 minuets
@@ -238,7 +230,6 @@ class NodeManager {
238
230
nodeGraph : NodeGraph ;
239
231
taskManager : TaskManager ;
240
232
gestaltGraph : GestaltGraph ;
241
- certManager ?: CertManager ;
242
233
refreshBucketDelay ?: number ;
243
234
refreshBucketDelayJitter ?: number ;
244
235
retrySeedConnectionsDelay ?: number ;
@@ -253,7 +244,6 @@ class NodeManager {
253
244
this . nodeGraph = nodeGraph ;
254
245
this . taskManager = taskManager ;
255
246
this . gestaltGraph = gestaltGraph ;
256
- this . certManager = certManager ;
257
247
this . refreshBucketDelay = refreshBucketDelay ;
258
248
// Clamped from 0 to 1 inclusive
259
249
this . refreshBucketDelayJitter = Math . max (
@@ -294,20 +284,12 @@ class NodeManager {
294
284
nodesEvents . EventNodeConnectionManagerConnection . name ,
295
285
this . handleNodeConnectionEvent ,
296
286
) ;
297
- this . certManager ?. addEventListener (
298
- keysEvents . EventsCertManagerCertChange . name ,
299
- this . handleEventsCertManagerCertChange ,
300
- ) ;
301
287
this . logger . info ( `Started ${ this . constructor . name } ` ) ;
302
288
}
303
289
304
290
public async stop ( ) {
305
291
this . logger . info ( `Stopping ${ this . constructor . name } ` ) ;
306
292
// Remove handling for connections
307
- this . certManager ?. removeEventListener (
308
- keysEvents . EventsCertManagerCertChange . name ,
309
- this . handleEventsCertManagerCertChange ,
310
- ) ;
311
293
this . nodeConnectionManager . removeEventListener (
312
294
nodesEvents . EventNodeConnectionManagerConnection . name ,
313
295
this . handleNodeConnectionEvent ,
0 commit comments