fix: bind final release authority and expiry

This commit is contained in:
2026-09-02 12:07:38 +03:00
parent a8fa09e21e
commit 90137c388c
7 changed files with 123 additions and 17 deletions

View File

@@ -674,6 +674,9 @@ async function activateUnlocked(input) {
) {
throw new Error("Protected authority changed before pointer publication.");
}
const publicationNow = nowFrom(input.testClock);
if (Date.parse(publicationNow) >= Date.parse(receipt.expiresAt))
throw new Error("Release expired before pointer publication.");
const nextPath = join(root, "current.next");
const nextInfo = await lstat(nextPath).catch((error) =>
error?.code === "ENOENT" ? null : Promise.reject(error),
@@ -697,7 +700,7 @@ async function activateUnlocked(input) {
finalState,
tx,
receipt,
activationNow,
publicationNow,
false,
);
}