aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/export-import.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-05-26 11:07:25 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-06-19 12:08:23 -0400
commit95eae0c002da5ef35e583b46a67818ebb95d3a1e (patch)
tree5ffdafd07c800bf91f6e3eca6f922bc1549b2cc8 /src/libstore/export-import.cc
parent469d06f9bc9b2543f48d8e633e47f9344fba35ab (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/export-import.cc')
-rw-r--r--src/libstore/export-import.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/export-import.cc b/src/libstore/export-import.cc
index 72ad77124..b4100bace 100644
--- a/src/libstore/export-import.cc
+++ b/src/libstore/export-import.cc
@@ -46,7 +46,7 @@ void Store::exportPath(const StorePath & path, Sink & sink)
teeSink
<< exportMagic
<< printStorePath(path);
- workerProtoWrite(*this, teeSink, info->references);
+ WorkerProto::write(*this, teeSink, info->references);
teeSink
<< (info->deriver ? printStorePath(*info->deriver) : "")
<< 0;
@@ -74,7 +74,7 @@ StorePaths Store::importPaths(Source & source, CheckSigsFlag checkSigs)
//Activity act(*logger, lvlInfo, "importing path '%s'", info.path);
- auto references = WorkerProto<StorePathSet>::read(*this, source);
+ auto references = WorkerProto::Serialise<StorePathSet>::read(*this, source);
auto deriver = readString(source);
auto narHash = hashString(htSHA256, saved.s);