feat: 实现公平捞瓶和领取租约

This commit is contained in:
root
2026-09-15 13:56:56 +08:00
parent 969a10d664
commit 69fc8d51ce
23 changed files with 1221 additions and 20 deletions
+3
View File
@@ -165,6 +165,7 @@ describe("database authority constraints", () => {
bottleId: bottle.id,
pickerId: firstPicker.id,
leaseTokenHash: "lease-a",
leaseTokenCiphertext: Buffer.from("ciphertext-a"),
expiresAt: new Date(Date.now() + 60_000),
},
});
@@ -174,6 +175,7 @@ describe("database authority constraints", () => {
bottleId: bottle.id,
pickerId: secondPicker.id,
leaseTokenHash: "lease-b",
leaseTokenCiphertext: Buffer.from("ciphertext-b"),
expiresAt: new Date(Date.now() + 60_000),
},
}),
@@ -188,6 +190,7 @@ describe("database authority constraints", () => {
bottleId: bottle.id,
pickerId: secondPicker.id,
leaseTokenHash: "lease-c",
leaseTokenCiphertext: Buffer.from("ciphertext-c"),
expiresAt: new Date(Date.now() + 60_000),
},
}),