From f45ce74cb56e3747847aed4ccdf1a7b5413df0a3 Mon Sep 17 00:00:00 2001 From: Anurag Saksena Date: Mon, 24 Jun 2024 17:55:24 -0700 Subject: [PATCH] feature: Added Get Block. Refined getBlock() --- .../java/com/hedera/block/server/BlockStreamService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/src/main/java/com/hedera/block/server/BlockStreamService.java b/server/src/main/java/com/hedera/block/server/BlockStreamService.java index d4e5af7d7..f265a8a4b 100644 --- a/server/src/main/java/com/hedera/block/server/BlockStreamService.java +++ b/server/src/main/java/com/hedera/block/server/BlockStreamService.java @@ -7,6 +7,8 @@ import java.util.logging.Logger; +import static io.helidon.webserver.grpc.ResponseHelper.complete; + public class BlockStreamService implements GrpcService { @@ -30,7 +32,10 @@ public void update(Routing routing) { // @Override void invoke(ReqT request, StreamObserver responseObserver); private void getBlock(BlockStreamServiceGrpcProto.BlockRequest request, StreamObserver responseObserver) { + String message = "GET BLOCK RESPONSE! "; logger.info("GetBlock request received"); + BlockStreamServiceGrpcProto.Block response = BlockStreamServiceGrpcProto.Block.newBuilder().setValue(message).build(); + complete(responseObserver, response); }