File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { Schema } from './schema';
1414import { VaultManager } from './vaults' ;
1515import { ACL } from './acl' ;
1616import { NodeConnectionManager , NodeGraph , NodeManager } from './nodes' ;
17+ import * as nodesUtils from './nodes/utils' ;
1718import { NotificationsManager } from './notifications' ;
1819import { GestaltGraph } from './gestalts' ;
1920import { Sigchain } from './sigchain' ;
@@ -190,6 +191,14 @@ class PolykeyAgent {
190191 logger : logger . getChild ( KeyManager . name ) ,
191192 fresh,
192193 } ) ) ;
194+ // Remove your own node ID if provided as a seed node
195+ const nodeIdOwn = keyManager . getNodeId ( ) ;
196+ const nodeIdEncodedOwn = Object . keys ( seedNodes ) . find ( nodeIdEncoded => {
197+ return nodeIdOwn . equals ( nodesUtils . decodeNodeId ( nodeIdEncoded ) ! ) ;
198+ } ) ;
199+ if ( nodeIdEncodedOwn != null ) {
200+ delete seedNodes [ nodeIdEncodedOwn ] ;
201+ }
193202 db =
194203 db ??
195204 ( await DB . createDB ( {
You can’t perform that action at this time.
0 commit comments