Skip to content

Commit

Permalink
MAT-1397 - sidechannel methods in module
Browse files Browse the repository at this point in the history
  • Loading branch information
mankenavenkatesh committed May 12, 2020
1 parent 793c46c commit 3c1bbbd
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions slashing/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/maticnetwork/heimdall/slashing/simulation"
"github.com/maticnetwork/heimdall/slashing/types"
"github.com/maticnetwork/heimdall/staking"
hmTypes "github.com/maticnetwork/heimdall/types"
hmModule "github.com/maticnetwork/heimdall/types/module"
simTypes "github.com/maticnetwork/heimdall/types/simulation"

Expand Down Expand Up @@ -149,6 +150,7 @@ func (am AppModule) NewQuerierHandler() sdk.Querier {
// InitGenesis performs genesis initialization for the slashing module. It returns
// no validator updates.
func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate {
fmt.Println("in slashing module - init genesis")
var genesisState types.GenesisState
types.ModuleCdc.MustUnmarshalJSON(data, &genesisState)
InitGenesis(ctx, am.keeper, genesisState)
Expand Down Expand Up @@ -202,3 +204,17 @@ func (AppModule) RegisterStoreDecoder(sdr hmModule.StoreDecoderRegistry) {
func (AppModule) WeightedOperations(_ hmModule.SimulationState) []simTypes.WeightedOperation {
return nil
}

//
// Side module
//

// NewSideTxHandler side tx handler
func (am AppModule) NewSideTxHandler() hmTypes.SideTxHandler {
return NewSideTxHandler(am.keeper, am.contractCaller)
}

// NewPostTxHandler side tx handler
func (am AppModule) NewPostTxHandler() hmTypes.PostTxHandler {
return NewPostTxHandler(am.keeper, am.contractCaller)
}

0 comments on commit 3c1bbbd

Please sign in to comment.