Skip to content

Commit

Permalink
feat: keep default to get proofs and expose partset without proof
Browse files Browse the repository at this point in the history
  • Loading branch information
rach-id committed Oct 14, 2024
1 parent dae15af commit 4304c44
Show file tree
Hide file tree
Showing 5 changed files with 166 additions and 162 deletions.
146 changes: 73 additions & 73 deletions proto/tendermint/rpc/grpc/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions proto/tendermint/rpc/grpc/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ message RequestBroadcastTx {
}

message BlockByHashRequest {
bytes hash = 1;
bool prove_parts = 2;
bytes hash = 1;
bool ignore_proof = 2;
}

message BlockByHeightRequest {
int64 height = 1;
bool prove_parts = 2;
int64 height = 1;
bool ignore_proof = 2;
}

message BlockMetaByHashRequest {
Expand Down
4 changes: 2 additions & 2 deletions rpc/grpc/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (blockAPI *BlockAPI) BlockByHash(req *BlockByHashRequest, stream BlockAPI_B
if err != nil {
return err
}
if !req.ProveParts {
if req.IgnoreProof {
part.Proof = crypto.Proof{}
}
isLastPart := i == int(blockMeta.BlockID.PartSetHeader.Total)-1
Expand All @@ -213,7 +213,7 @@ func (blockAPI *BlockAPI) BlockByHeight(req *BlockByHeightRequest, stream BlockA
if err != nil {
return err
}
if !req.ProveParts {
if req.IgnoreProof {
part.Proof = crypto.Proof{}
}
isLastPart := i == int(blockMeta.BlockID.PartSetHeader.Total)-1
Expand Down
Loading

0 comments on commit 4304c44

Please sign in to comment.