Skip to content

Commit

Permalink
vote extension
Browse files Browse the repository at this point in the history
  • Loading branch information
steel-feel committed Jul 12, 2024
1 parent 4e2f6e6 commit aab41bd
Show file tree
Hide file tree
Showing 6 changed files with 20,659 additions and 20,036 deletions.
23 changes: 23 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ import (
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"

xarchainmodulekeeper "xarchain/x/xarchain/keeper"
xarchain_abci "xarchain/x/xarchain/abci"
// this line is used by starport scaffolding # stargate/app/moduleImport

"xarchain/docs"
// "time"
)

const (
Expand Down Expand Up @@ -285,6 +287,27 @@ func New(
panic(err)
}

voteExtHandler := xarchain_abci.NewCAExtHandler(
logger,
app.XarchainKeeper,
)

propHandler := xarchain_abci.NewProposalHandler(
logger,
app.XarchainKeeper,
app.StakingKeeper,
)

baseAppOptions = append(baseAppOptions, func(ba *baseapp.BaseApp) {
ba.SetExtendVoteHandler(voteExtHandler.ExtendVoteHandler())
ba.SetVerifyVoteExtensionHandler(voteExtHandler.VerifyVoteExtensionHandler())
ba.SetPrepareProposal(propHandler.PrepareProposal())
ba.SetProcessProposal(propHandler.ProcessProposal())
ba.SetPreBlocker(propHandler.PreBlocker)
})



// Below we could construct and set an application specific mempool and
// ABCI 1.0 PrepareProposal and ProcessProposal handlers. These defaults are
// already set in the SDK's BaseApp, this shows an example of how to override
Expand Down
5 changes: 5 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@ faucet:
validators:
- name: alice
bonded: 100000000stake
genesis:
consensus:
params:
abci:
vote_extensions_enable_height : "1"
Loading

0 comments on commit aab41bd

Please sign in to comment.