Skip to content

Commit

Permalink
remove setting lifetime for IPNS
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinse12 committed Dec 1, 2024
1 parent ebb4888 commit 2b5f443
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/runtime/node/subplebbit/local-subplebbit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,15 +449,13 @@ export class LocalSubplebbit extends RpcLocalSubplebbit implements CreateNewLoca
// if this._stopHasBeenCalled = false, it means we're gonna publish another update very soon, so the record should not live for long
// TODO double check these values
const ttl = `${this._plebbit.publishInterval * 3}ms`;
const lifetime = `999999h`; // doesn't matter anyway, DHT drops all entries after 24h
const publishRes = await this._clientsManager.getDefaultIpfs()._client.name.publish(file.path, {
key: this.signer.ipnsKeyName,
allowOffline: true,
ttl,
lifetime
ttl
});
log(
`Published a new IPNS record for sub(${this.address}) on IPNS (${publishRes.name}) that points to file (${publishRes.value}) with updatedAt (${newSubplebbitRecord.updatedAt}) and TTL (${ttl}) and lifetime (${lifetime})`
`Published a new IPNS record for sub(${this.address}) on IPNS (${publishRes.name}) that points to file (${publishRes.value}) with updatedAt (${newSubplebbitRecord.updatedAt}) and TTL (${ttl})`
);
if (this.updateCid) this._cidsToUnPin.push(this.updateCid); // add old cid of subplebbit to be unpinned

Expand Down

0 comments on commit 2b5f443

Please sign in to comment.