Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ValidPath (nar) hash optional if ca field is present #4059

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Introduce hashOrContentAddress and fix init
  • Loading branch information
meditans committed Aug 19, 2020
commit aff50aa88b45dd0a9beeb14a3c12ab448eb15d6b
7 changes: 5 additions & 2 deletions src/libstore/path-info.hh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ struct ValidPathInfo
StorePath path;
std::optional<StorePath> deriver;
// TODO document this
These<Hash, ContentAddress> hashOrContentAddress;
Hash narHash;
StorePathSet references;
time_t registrationTime = 0;
Expand Down Expand Up @@ -102,8 +103,10 @@ struct ValidPathInfo

ValidPathInfo(const ValidPathInfo & other) = default;

ValidPathInfo(StorePath && path, Hash narHash) : path(std::move(path)), narHash(narHash) { };
ValidPathInfo(const StorePath & path, Hash narHash) : path(path), narHash(narHash) { };
ValidPathInfo(StorePath && path, Hash narHash)
: path(std::move(path)), hashOrContentAddress(narHash), narHash(narHash) { };
ValidPathInfo(const StorePath & path, Hash narHash)
: path(path), hashOrContentAddress(narHash), narHash(narHash) { };

virtual ~ValidPathInfo() { }
};
Expand Down