Skip to content

Commit

Permalink
return BlockResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
anjor committed Oct 30, 2024
1 parent b3e3754 commit 8de6a64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
4 changes: 4 additions & 0 deletions grpc-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
20 changes: 1 addition & 19 deletions old-faithful-proto/proto/old-faithful.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand Down Expand Up @@ -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;
}

0 comments on commit 8de6a64

Please sign in to comment.