Fix: use newPass.base
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user