diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-05-26 11:07:25 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-06-19 12:08:23 -0400 |
commit | 95eae0c002da5ef35e583b46a67818ebb95d3a1e (patch) | |
tree | 5ffdafd07c800bf91f6e3eca6f922bc1549b2cc8 /src/libstore/path-info.cc | |
parent | 469d06f9bc9b2543f48d8e633e47f9344fba35ab (diff) |
Put worker protocol items inside a `WorkerProto` struct
See API docs on that struct for why. The pasing as as template argument
doesn't yet happen in that commit, but will instead happen in later
commit.
Also make `WorkerOp` (now `Op`) and enum struct. This led us to catch
that two operations were not handled!
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Diffstat (limited to 'src/libstore/path-info.cc')
-rw-r--r-- | src/libstore/path-info.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/path-info.cc b/src/libstore/path-info.cc index 6b93976fa..9971de1dd 100644 --- a/src/libstore/path-info.cc +++ b/src/libstore/path-info.cc @@ -133,7 +133,7 @@ ValidPathInfo ValidPathInfo::read(Source & source, const Store & store, unsigned auto narHash = Hash::parseAny(readString(source), htSHA256); ValidPathInfo info(path, narHash); if (deriver != "") info.deriver = store.parseStorePath(deriver); - info.references = WorkerProto<StorePathSet>::read(store, source); + info.references = WorkerProto::Serialise<StorePathSet>::read(store, source); source >> info.registrationTime >> info.narSize; if (format >= 16) { source >> info.ultimate; @@ -154,7 +154,7 @@ void ValidPathInfo::write( sink << store.printStorePath(path); sink << (deriver ? store.printStorePath(*deriver) : "") << narHash.to_string(Base16, false); - workerProtoWrite(store, sink, references); + WorkerProto::write(store, sink, references); sink << registrationTime << narSize; if (format >= 16) { sink << ultimate |