Fix: use newPass.base

This commit is contained in:
Raven Scott
2026-05-28 11:11:27 -04:00
parent 84199270b3
commit 51ad117612
+6 -2
View File
@@ -74,8 +74,12 @@ function createCoreSwarmHandlers(ctx) {
logInfo('Swarm', 'Paired Autopass ready — dnsPass initialized');
setDnsPass(newPass);
logInfo('Swarm', `Joiner core ready. Writable: ${core.writable}`);
await core.update();
const activeCore = newPass?.base;
if (!activeCore) {
throw new Error('Autopass pair did not provide a base hypercore');
}
logInfo('Swarm', `Joiner core ready. Writable: ${activeCore.writable}`);
await activeCore.update();
logDebug('Swarm', 'Synced initial data from master');
const currentDnsPass = getDnsPass();