Replace TreeSearchResponse with CondensedTreeSearchResponse

This commit is contained in:
Katherine
2024-11-04 10:36:15 -05:00
committed by GitHub
parent 00d0dba62c
commit 7633a9b07a
4 changed files with 18 additions and 21 deletions

View File

@@ -121,10 +121,7 @@ public class KeyTransparencyController {
request.lastTreeHeadSize(),
request.distinguishedTreeHeadSize(),
KEY_TRANSPARENCY_RPC_TIMEOUT)
.thenApply(searchResponse ->
new KeyTransparencySearchResponse(
searchResponse.toByteArray())
).join();
.thenApply(KeyTransparencySearchResponse::new).join();
} catch (final CancellationException exception) {
LOGGER.error("Unexpected cancellation from key transparency service", exception);
throw new ServerErrorException(Response.Status.SERVICE_UNAVAILABLE, exception);