From 8de6a649483c18b5fed845959b7bf3ff71450fd6 Mon Sep 17 00:00:00 2001 From: anjor Date: Wed, 30 Oct 2024 13:22:27 +0000 Subject: [PATCH] return BlockResponse --- grpc-server.go | 4 ++++ old-faithful-proto/proto/old-faithful.proto | 20 +------------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/grpc-server.go b/grpc-server.go index c5155a6f..63a3fc11 100644 --- a/grpc-server.go +++ b/grpc-server.go @@ -621,3 +621,7 @@ func (multi *MultiEpoch) GetBlockTime(ctx context.Context, params *old_faithful_ BlockTime: int64(blocktime), }, nil } + +func (multi *MultiEpoch) StreamBlocks(*old_faithful_grpc.StreamBlocksRequest, grpc.ServerStreamingServer[*old_faithful_grpc.StreamBlocksResponse]) error { + return nil +} diff --git a/old-faithful-proto/proto/old-faithful.proto b/old-faithful-proto/proto/old-faithful.proto index 1a7ed9ec..de328a7e 100644 --- a/old-faithful-proto/proto/old-faithful.proto +++ b/old-faithful-proto/proto/old-faithful.proto @@ -12,7 +12,7 @@ service OldFaithful { rpc Get(stream GetRequest) returns (stream GetResponse); - rpc StreamBlocks(StreamBlocksRequest) returns (stream StreamBlocksResponse); + rpc StreamBlocks(StreamBlocksRequest) returns (stream BlockResponse); } message VersionRequest {} @@ -103,21 +103,3 @@ message StreamBlocksRequest { message StreamBlocksFilter { repeated string account_include = 1; // Filter blocks/txns mentioning these accounts } - -message StreamBlocksResponse { - oneof response { - StreamBlocksError error = 1; - BlockResponse block = 2; - } -} - -message StreamBlocksError { - StreamBlocksErrorCode code = 1; - string message = 2; -} - -enum StreamBlocksErrorCode { - STREAM_BLOCKS_INTERNAL = 0; - STREAM_BLOCKS_INVALID_SLOT_RANGE = 1; - STREAM_BLOCKS_SLOT_NOT_FOUND = 2; -}