aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/remote-store.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-03-30 17:12:49 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-03-30 17:12:49 -0400
commitc51d554c933b5fe294da41fcdf5afe0d4f33f586 (patch)
treedff117a533922030096112ad0bc915287dfc2644 /src/libstore/remote-store.cc
parenta6d00a7bfb18e7ec461ac1d54203cc628aca5c66 (diff)
Use "raw pattern" for content address types
We weren't because this ancient PR predated it! This is actually a new version of the pattern which addresses some issues identified in #7479.
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r--src/libstore/remote-store.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index d24d83117..ac98e76d2 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -44,7 +44,7 @@ void write(const Store & store, Sink & out, const StorePath & storePath)
ContentAddress read(const Store & store, Source & from, Phantom<ContentAddress> _)
{
- return parseContentAddress(readString(from));
+ return ContentAddress::parse(readString(from));
}
void write(const Store & store, Sink & out, const ContentAddress & ca)
@@ -134,7 +134,7 @@ void write(const Store & store, Sink & out, const std::optional<StorePath> & sto
std::optional<ContentAddress> read(const Store & store, Source & from, Phantom<std::optional<ContentAddress>> _)
{
- return parseContentAddressOpt(readString(from));
+ return ContentAddress::parseOpt(readString(from));
}
void write(const Store & store, Sink & out, const std::optional<ContentAddress> & caOpt)
@@ -545,7 +545,7 @@ ref<const ValidPathInfo> RemoteStore::addCAToStore(
conn->to
<< wopAddToStore
<< name
- << renderContentAddressMethod(caMethod);
+ << caMethod.render();
worker_proto::write(*this, conn->to, references);
conn->to << repair;
@@ -603,7 +603,7 @@ ref<const ValidPathInfo> RemoteStore::addCAToStore(
}
}
- }, caMethod);
+ }, caMethod.raw);
auto path = parseStorePath(readString(conn->from));
// Release our connection to prevent a deadlock in queryPathInfo().
conn_.reset();