aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/path-info.hh
diff options
context:
space:
mode:
authorCarlo Nucera <carlo.nucera@protonmail.com>2020-08-05 14:42:48 -0400
committerCarlo Nucera <carlo.nucera@protonmail.com>2020-08-05 14:42:48 -0400
commit1d71028f4d43f8e3ade559f7187f697c7bb9d709 (patch)
treea39dd015e3ac87729d058f1c1d274966ce5cf7c7 /src/libstore/path-info.hh
parentd3452a5ed6e7f052aad5e7fd9aaa1061b0c54652 (diff)
Remove optionality in ValidPathInfo::narInfo
Diffstat (limited to 'src/libstore/path-info.hh')
-rw-r--r--src/libstore/path-info.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/path-info.hh b/src/libstore/path-info.hh
index 2a015ea3c..ba154dab7 100644
--- a/src/libstore/path-info.hh
+++ b/src/libstore/path-info.hh
@@ -29,7 +29,7 @@ struct ValidPathInfo
StorePath path;
std::optional<StorePath> deriver;
// TODO document this
- std::optional<Hash> narHash;
+ Hash narHash;
StorePathSet references;
time_t registrationTime = 0;
uint64_t narSize = 0; // 0 = unknown
@@ -100,8 +100,8 @@ struct ValidPathInfo
ValidPathInfo(const ValidPathInfo & other) = default;
- ValidPathInfo(StorePath && path) : path(std::move(path)) { };
- ValidPathInfo(const StorePath & path) : path(path) { };
+ ValidPathInfo(StorePath && path) : path(std::move(path)), narHash(Hash(htSHA256)) { };
+ ValidPathInfo(const StorePath & path) : path(path), narHash(Hash(htSHA256)) { };
virtual ~ValidPathInfo() { }
};