@@ -224,7 +224,7 @@ async function main() {
|
||||
// Initialize corestore with a stable primaryKey derived from our persistent keypair
|
||||
// This ensures core keys are deterministic and persistent across restarts
|
||||
const primaryKey = crypto.createHash('sha256').update(keypair.secretKey).digest();
|
||||
const store = new Corestore(process.env.STORAGE_DIR || './my-storage', { primaryKey, unsafe: true });
|
||||
const store = new Corestore(process.env.STORAGE_DIR || './my-storage', { primaryKey });
|
||||
logInfo('Main', `Corestore initialized with stable primaryKey and storage: ${process.env.STORAGE_DIR || 'my-storage'}`);
|
||||
// Use the persistent keypair that was loaded earlier (already in state.keypair)
|
||||
// Configure Hyperswarm for better local network peer discovery
|
||||
|
||||
@@ -713,7 +713,7 @@ async function setupP2NS() {
|
||||
|
||||
// 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, unsafe: true });
|
||||
const store = new Corestore(config.STORAGE_DIR, { primaryKey });
|
||||
state.store = store;
|
||||
logInfo('Main', `Corestore initialized with stable primaryKey`, { storageDir: config.STORAGE_DIR });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user