1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Factor out UnkeyedValidPathInfo and test

This makes the path info serialisers ideomatic again, which allows me to
test them.
This commit is contained in:
John Ericson 2023-04-17 17:13:44 -04:00
parent 596bd469cc
commit 70f8b96c11
10 changed files with 218 additions and 34 deletions

View file

@ -819,7 +819,7 @@ static void performOp(TunnelLogger * logger, ref<Store> store,
if (info) {
if (GET_PROTOCOL_MINOR(clientVersion) >= 17)
to << 1;
WorkerProto::Serialise<ValidPathInfo>::write(*store, wconn, *info, false);
WorkerProto::write(*store, wconn, static_cast<const UnkeyedValidPathInfo &>(*info));
} else {
assert(GET_PROTOCOL_MINOR(clientVersion) >= 17);
to << 0;