aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/path-info.cc
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2023-10-20 15:34:26 +0200
committereldritch horrors <pennae@lix.systems>2024-03-04 04:43:35 +0100
commitab40b2c5d0f90d6a119bf4b368f933f5331b0c15 (patch)
tree305c600d732546077701abefc9dddecdd2eadf0f /src/libstore/path-info.cc
parent5ddd1a916667ec0d969f99a0a85a2092bf18b632 (diff)
Merge pull request #9157 from obsidiansystems/protocol-versions
Add protocol versions to `{Worker,Serve}Proto::*Conn` (cherry picked from commit 4d17c59d8d059a5b39f1d1da2b58f2ec8da44861) Change-Id: I497af39deb792e50c157a1305d8c9e722798740b
Diffstat (limited to 'src/libstore/path-info.cc')
-rw-r--r--src/libstore/path-info.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libstore/path-info.cc b/src/libstore/path-info.cc
index ccb57104f..a9231ce8d 100644
--- a/src/libstore/path-info.cc
+++ b/src/libstore/path-info.cc
@@ -141,7 +141,10 @@ ValidPathInfo ValidPathInfo::read(Source & source, const Store & store, unsigned
ValidPathInfo info(path, narHash);
if (deriver != "") info.deriver = store.parseStorePath(deriver);
info.references = WorkerProto::Serialise<StorePathSet>::read(store,
- WorkerProto::ReadConn { .from = source });
+ WorkerProto::ReadConn {
+ .from = source,
+ .version = format,
+ });
source >> info.registrationTime >> info.narSize;
if (format >= 16) {
source >> info.ultimate;
@@ -163,7 +166,10 @@ void ValidPathInfo::write(
sink << (deriver ? store.printStorePath(*deriver) : "")
<< narHash.to_string(Base16, false);
WorkerProto::write(store,
- WorkerProto::WriteConn { .to = sink },
+ WorkerProto::WriteConn {
+ .to = sink,
+ .version = format,
+ },
references);
sink << registrationTime << narSize;
if (format >= 16) {