Bump miner/worker api versions
This commit is contained in:
parent
7124cd5149
commit
8625da3479
@ -57,8 +57,8 @@ var (
|
||||
FullAPIVersion0 = newVer(1, 3, 0)
|
||||
FullAPIVersion1 = newVer(2, 1, 0)
|
||||
|
||||
MinerAPIVersion0 = newVer(1, 0, 1)
|
||||
WorkerAPIVersion0 = newVer(1, 0, 0)
|
||||
MinerAPIVersion0 = newVer(1, 1, 0)
|
||||
WorkerAPIVersion0 = newVer(1, 1, 0)
|
||||
)
|
||||
|
||||
//nolint:varcheck,deadcode
|
||||
|
@ -38,6 +38,16 @@ func connectRemoteWorker(ctx context.Context, fa api.Common, url string) (*remot
|
||||
return nil, xerrors.Errorf("creating jsonrpc client: %w", err)
|
||||
}
|
||||
|
||||
wver, err := wapi.Version(ctx)
|
||||
if err != nil {
|
||||
closer()
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if !wver.EqMajorMinor(api.WorkerAPIVersion0) {
|
||||
return nil, xerrors.Errorf("unsupported worker api version: %s (expected %s)", wver, api.WorkerAPIVersion0)
|
||||
}
|
||||
|
||||
return &remoteWorker{wapi, closer}, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user