@@ -711,11 +711,9 @@ async function setupP2NS() {
|
||||
state.keypair = keypair;
|
||||
logInfo('Main', 'Persistent keypair loaded');
|
||||
|
||||
// Initialize corestore with a stable primaryKey derived from our persistent keypair
|
||||
const primaryKey = crypto.createHash('sha256').update(keypair.secretKey).digest();
|
||||
const store = new Corestore(config.STORAGE_DIR, { primaryKey });
|
||||
const store = new Corestore(config.STORAGE_DIR);
|
||||
state.store = store;
|
||||
logInfo('Main', `Corestore initialized with stable primaryKey`, { storageDir: config.STORAGE_DIR });
|
||||
logInfo('Main', `Corestore initialized`, { storageDir: config.STORAGE_DIR });
|
||||
|
||||
// Use the persistent keypair from state
|
||||
// Configure Hyperswarm for better local network peer discovery
|
||||
|
||||
Reference in New Issue
Block a user