Fix: use newPass.base
This commit is contained in:
@@ -74,8 +74,12 @@ function createCoreSwarmHandlers(ctx) {
|
|||||||
|
|
||||||
logInfo('Swarm', 'Paired Autopass ready — dnsPass initialized');
|
logInfo('Swarm', 'Paired Autopass ready — dnsPass initialized');
|
||||||
setDnsPass(newPass);
|
setDnsPass(newPass);
|
||||||
logInfo('Swarm', `Joiner core ready. Writable: ${core.writable}`);
|
const activeCore = newPass?.base;
|
||||||
await core.update();
|
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');
|
logDebug('Swarm', 'Synced initial data from master');
|
||||||
|
|
||||||
const currentDnsPass = getDnsPass();
|
const currentDnsPass = getDnsPass();
|
||||||
|
|||||||
Reference in New Issue
Block a user