@@ -2,7 +2,6 @@ import type { DB, DBTransaction } from '@matrixai/db';
22import type NodeConnectionManager from './NodeConnectionManager' ;
33import type NodeGraph from './NodeGraph' ;
44import type KeyRing from '../keys/KeyRing' ;
5- import type CertManager from '../keys/CertManager' ;
65import type Sigchain from '../sigchain/Sigchain' ;
76import type {
87 NodeId ,
@@ -22,7 +21,6 @@ import type GestaltGraph from '../gestalts/GestaltGraph';
2221import type { TaskHandler , TaskHandlerId , Task } from '../tasks/types' ;
2322import type { ContextTimed } from '@matrixai/contexts' ;
2423import type { PromiseCancellable } from '@matrixai/async-cancellable' ;
25- import type { ContextTimedInput } from '@matrixai/contexts/dist/types' ;
2624import type { Host , Port } from '../network/types' ;
2725import type { SignedTokenEncoded } from '../tokens/types' ;
2826import type { ClaimLinkNode } from '../claims/payloads/index' ;
@@ -31,6 +29,7 @@ import type {
3129 AgentRPCRequestParams ,
3230 AgentRPCResponseResult ,
3331} from '../agent/types' ;
32+ import type { ContextTimedInput } from '@matrixai/contexts/dist/types' ;
3433import Logger from '@matrixai/logger' ;
3534import { StartStop , ready } from '@matrixai/async-init/dist/StartStop' ;
3635import { Semaphore , Lock } from '@matrixai/async-locks' ;
@@ -43,7 +42,6 @@ import * as claimsUtils from '../claims/utils';
4342import * as tasksErrors from '../tasks/errors' ;
4443import * as claimsErrors from '../claims/errors' ;
4544import * as keysUtils from '../keys/utils' ;
46- import * as keysEvents from '../keys/events' ;
4745import { never , promise } from '../utils/utils' ;
4846import {
4947 decodeClaimId ,
@@ -62,7 +60,6 @@ class NodeManager {
6260 protected logger : Logger ;
6361 protected sigchain : Sigchain ;
6462 protected keyRing : KeyRing ;
65- protected certManager ?: CertManager ;
6663 protected nodeConnectionManager : NodeConnectionManager ;
6764 protected nodeGraph : NodeGraph ;
6865 protected taskManager : TaskManager ;
@@ -213,10 +210,6 @@ class NodeManager {
213210 ) ;
214211 } ;
215212
216- protected handleEventsCertManagerCertChange = async ( ) => {
217- await this . resetBuckets ( ) ;
218- } ;
219-
220213 constructor ( {
221214 db,
222215 keyRing,
@@ -225,7 +218,6 @@ class NodeManager {
225218 nodeGraph,
226219 taskManager,
227220 gestaltGraph,
228- certManager,
229221 refreshBucketDelay = 3600000 , // 1 hour in milliseconds
230222 refreshBucketDelayJitter = 0.5 , // Multiple of refreshBucketDelay to jitter by
231223 retrySeedConnectionsDelay = 120000 , // 2 minuets
@@ -238,7 +230,6 @@ class NodeManager {
238230 nodeGraph : NodeGraph ;
239231 taskManager : TaskManager ;
240232 gestaltGraph : GestaltGraph ;
241- certManager ?: CertManager ;
242233 refreshBucketDelay ?: number ;
243234 refreshBucketDelayJitter ?: number ;
244235 retrySeedConnectionsDelay ?: number ;
@@ -253,7 +244,6 @@ class NodeManager {
253244 this . nodeGraph = nodeGraph ;
254245 this . taskManager = taskManager ;
255246 this . gestaltGraph = gestaltGraph ;
256- this . certManager = certManager ;
257247 this . refreshBucketDelay = refreshBucketDelay ;
258248 // Clamped from 0 to 1 inclusive
259249 this . refreshBucketDelayJitter = Math . max (
@@ -294,20 +284,12 @@ class NodeManager {
294284 nodesEvents . EventNodeConnectionManagerConnection . name ,
295285 this . handleNodeConnectionEvent ,
296286 ) ;
297- this . certManager ?. addEventListener (
298- keysEvents . EventsCertManagerCertChange . name ,
299- this . handleEventsCertManagerCertChange ,
300- ) ;
301287 this . logger . info ( `Started ${ this . constructor . name } ` ) ;
302288 }
303289
304290 public async stop ( ) {
305291 this . logger . info ( `Stopping ${ this . constructor . name } ` ) ;
306292 // Remove handling for connections
307- this . certManager ?. removeEventListener (
308- keysEvents . EventsCertManagerCertChange . name ,
309- this . handleEventsCertManagerCertChange ,
310- ) ;
311293 this . nodeConnectionManager . removeEventListener (
312294 nodesEvents . EventNodeConnectionManagerConnection . name ,
313295 this . handleNodeConnectionEvent ,
0 commit comments