Skip to content

Commit

Permalink
chore: add new query to return next block to be rewarded
Browse files Browse the repository at this point in the history
  • Loading branch information
RafilxTenfen committed Jan 3, 2025
1 parent aaac0d4 commit 3d37f62
Show file tree
Hide file tree
Showing 9 changed files with 807 additions and 373 deletions.
17 changes: 17 additions & 0 deletions proto/babylon/finality/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ service Query {
rpc SigningInfos(QuerySigningInfosRequest) returns (QuerySigningInfosResponse) {
option (google.api.http).get = "/babylon/finality/v1/signing_infos";
}

// NextRewardHeight queries the next block height to reward
rpc NextRewardHeight(QueryNextRewardHeightRequest) returns (QueryNextRewardHeightResponse) {
option (google.api.http).get = "/babylon/finality/v1/next_reward_height";
}
}

// QueryParamsRequest is request type for the Query/Params RPC method.
Expand Down Expand Up @@ -396,3 +401,15 @@ message QuerySigningInfosResponse {
repeated SigningInfoResponse signing_infos = 1 [(gogoproto.nullable) = false];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QueryNextRewardHeightRequest is the request type for the Query/NextRewardHeight RPC
// method
message QueryNextRewardHeightRequest {
}

// QueryNextRewardHeightResponse is the response type for the Query/NextRewardHeight RPC
// method
message QueryNextRewardHeightResponse {
// NextRewardHeight is the next block height which will be rewarded
uint64 next_reward_height = 2;
}
161 changes: 79 additions & 82 deletions x/btcstaking/types/events.pb.go

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

Loading

0 comments on commit 3d37f62

Please sign in to comment.