1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 19:01:16 +02:00

Narinfo sign: multiple signatures variant

This is a small optimization used when we're signing a narinfo for
multiple keys in one go. Using this sign variant, we only compute the
NAR fingerprint once, then sign it with all the keys.
This commit is contained in:
Picnoir 2025-04-14 10:30:47 +02:00
parent e12369a68e
commit 7ea536fe84
3 changed files with 10 additions and 3 deletions

View file

@ -279,9 +279,7 @@ ref<const ValidPathInfo> BinaryCacheStore::addToStoreCommon(
stats.narWriteCompressedBytes += fileSize;
stats.narWriteCompressionTimeMs += duration;
for (auto &signer: signers) {
narInfo->sign(*this, *signer);
}
narInfo->sign(*this, signers);
/* Atomically write the NAR info file.*/
writeNarInfo(narInfo);