Merge pull request #10154 from filecoin-project/gstuart/re-add-not-serving-v0-api

fix: api: should not serve non v0 apis in v0
This commit is contained in:
Jiaying Wang 2023-01-31 19:18:12 -05:00 committed by GitHub
commit a38e63998e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,8 +94,9 @@ func FullNodeHandler(a v1api.FullNode, permissioned bool, opts ...jsonrpc.Server
fnapi = api.PermissionedFullAPI(fnapi)
}
var v0 v0api.FullNode = &(struct{ v0api.FullNode }{&v0api.WrapperV1Full{FullNode: fnapi}})
serveRpc("/rpc/v1", fnapi)
serveRpc("/rpc/v0", &v0api.WrapperV1Full{FullNode: fnapi})
serveRpc("/rpc/v0", v0)
// Import handler
handleImportFunc := handleImport(a.(*impl.FullNodeAPI))