Skip to content

Commit

Permalink
docs: add code links to vote-extensions docs (#18505)
Browse files Browse the repository at this point in the history
(cherry picked from commit e7b1d10)
  • Loading branch information
gsk967 authored and mergify[bot] committed Nov 19, 2023
1 parent 1b517b0 commit 7c9431b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/docs/build/building-apps/04-vote-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defined in ABCI++.

ABCI++ allows an application to extend a pre-commit vote with arbitrary data. This
process does NOT have to be deterministic, and the data returned can be unique to the
validator process. The Cosmos SDK defines `baseapp.ExtendVoteHandler`:
validator process. The Cosmos SDK defines [`baseapp.ExtendVoteHandler`](https://github.com/cosmos/cosmos-sdk/blob/v0.50.1/types/abci.go#L26-L27):

```go
type ExtendVoteHandler func(Context, *abci.RequestExtendVote) (*abci.ResponseExtendVote, error)
Expand All @@ -37,10 +37,10 @@ for more details.

Similar to extending a vote, an application can also verify vote extensions from
other validators when validating their pre-commits. For a given vote extension,
this process MUST be deterministic. The Cosmos SDK defines `sdk.VerifyVoteExtensionHandler`:
this process MUST be deterministic. The Cosmos SDK defines [`sdk.VerifyVoteExtensionHandler`](https://github.com/cosmos/cosmos-sdk/blob/v0.50.1/types/abci.go#L29-L31):

```go reference
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/types/abci.go#L26-L27
```go
type VerifyVoteExtensionHandler func(Context, *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error)
```

An application can set this handler in `app.go` via the `baseapp.SetVerifyVoteExtensionHandler`
Expand Down

0 comments on commit 7c9431b

Please sign in to comment.