aboutsummaryrefslogtreecommitdiff
path: root/src/nix/verify.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-05-28 10:48:36 +0200
committerGitHub <noreply@github.com>2021-05-28 10:48:36 +0200
commitb10256af51dfa929e8f916414d6f021dd45f2e1e (patch)
tree5d8f3e87b64279d1a6cdc8a139ddee20966b51a0 /src/nix/verify.cc
parentcf1d4299a8fa8906f62271dcd878018cef84cc30 (diff)
parent129384bcf3bf903ef1c6661b3f21659a2ad94228 (diff)
Merge pull request #4849 from NixOS/ca/fix-nix-store--export
Make the Nar hash non modulo
Diffstat (limited to 'src/nix/verify.cc')
-rw-r--r--src/nix/verify.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/nix/verify.cc b/src/nix/verify.cc
index 1721c7f16..f5a576064 100644
--- a/src/nix/verify.cc
+++ b/src/nix/verify.cc
@@ -97,15 +97,11 @@ struct CmdVerify : StorePathsCommand
if (!noContents) {
- std::unique_ptr<AbstractHashSink> hashSink;
- if (!info->ca)
- hashSink = std::make_unique<HashSink>(info->narHash.type);
- else
- hashSink = std::make_unique<HashModuloSink>(info->narHash.type, std::string(info->path.hashPart()));
+ auto hashSink = HashSink(info->narHash.type);
- store->narFromPath(info->path, *hashSink);
+ store->narFromPath(info->path, hashSink);
- auto hash = hashSink->finish();
+ auto hash = hashSink.finish();
if (hash.first != info->narHash) {
corrupted++;