1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-14 13:01:05 +01:00

Introduce MINIMUM_PROTOCOL_VERSION constant

This commit is contained in:
Eelco Dolstra 2025-10-27 15:11:16 +01:00
parent 1af5a98955
commit 91cd42511e
3 changed files with 3 additions and 2 deletions

View file

@ -73,7 +73,7 @@ void RemoteStore::initConnection(Connection & conn)
try {
auto [protoVersion, features] =
WorkerProto::BasicClientConnection::handshake(conn.to, tee, PROTOCOL_VERSION, WorkerProto::allFeatures);
if (protoVersion < 256 + 18)
if (protoVersion < MINIMUM_PROTOCOL_VERSION)
throw Error("the Nix daemon version is too old");
conn.protoVersion = protoVersion;
conn.features = features;