diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-02-24T15·38+0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-02-24T15·38+0100 |
commit | 1c718f80d3e91c6dd8f1337f81b37e4837384c75 (patch) | |
tree | 64e0ba90abd0fc6412404ec8e0310d58fa702fa7 /src/libstore/local-store.cc | |
parent | 668fef2e4f1c7758e2a55e355b4826014d5b7ba9 (diff) |
Verify content-addressability assertions at registration time
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r-- | src/libstore/local-store.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 9b775e16a387..bc63955af0e9 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -519,6 +519,8 @@ void LocalStore::checkDerivationOutputs(const Path & drvPath, const Derivation & uint64_t LocalStore::addValidPath(State & state, const ValidPathInfo & info, bool checkOutputs) { + assert(info.ca == "" || info.isContentAddressed(*this)); + state.stmtRegisterValidPath.use() (info.path) ("sha256:" + printHash(info.narHash)) |