From 5cd18e73b2618a6cbe227cbed936bec5b153d7c2 Mon Sep 17 00:00:00 2001 From: Matija Salopek Date: Mon, 7 Nov 2022 19:22:26 +0100 Subject: [PATCH] remove event addition TODO tags --- x/ccv/consumer/module.go | 6 ------ x/ccv/democracy/distribution/module.go | 2 -- x/ccv/democracy/governance/module.go | 2 -- x/ccv/provider/keeper/proposal.go | 4 ---- x/ccv/provider/keeper/relay.go | 6 ------ 5 files changed, 20 deletions(-) diff --git a/x/ccv/consumer/module.go b/x/ccv/consumer/module.go index 1fa2511c12..ae6f6bfda8 100644 --- a/x/ccv/consumer/module.go +++ b/x/ccv/consumer/module.go @@ -149,9 +149,6 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 1 } -// TODO: add events -// maybe emit event if panic is about to happen -// baybe emit blockheight and valupdateId // BeginBlock implements the AppModule interface // Set the VSC ID for the subsequent block to the same value as the current block // Panic if the provider's channel was established and then closed @@ -173,9 +170,6 @@ func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { am.keeper.TrackHistoricalInfo(ctx) } -// TODO: add events -// - provider fee distribution transmission -// - matured validator updates (the consumer could emit in keeper.EndBlockVSU) // EndBlock implements the AppModule interface // Flush PendingChanges to ABCI, and write acknowledgements for any packets that have finished unbonding. func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate { diff --git a/x/ccv/democracy/distribution/module.go b/x/ccv/democracy/distribution/module.go index b8c9a8d561..4c535aad44 100644 --- a/x/ccv/democracy/distribution/module.go +++ b/x/ccv/democracy/distribution/module.go @@ -59,8 +59,6 @@ func NewAppModule( } } -// TODO: add events -// - maybe emit amount added to fee pool // BeginBlocker mirror functionality of cosmos-sdk/distribution BeginBlocker // however it allocates no proposer reward func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { diff --git a/x/ccv/democracy/governance/module.go b/x/ccv/democracy/governance/module.go index 33a93c9273..4e7fe7b4a5 100644 --- a/x/ccv/democracy/governance/module.go +++ b/x/ccv/democracy/governance/module.go @@ -41,8 +41,6 @@ func NewAppModule(cdc codec.Codec, keeper keeper.Keeper, ak govtypes.AccountKeep } } -// TODO: add events -// - maybe emit ids of forbidden proposals func (am AppModule) EndBlock(ctx sdk.Context, request abci.RequestEndBlock) []abci.ValidatorUpdate { am.keeper.IterateActiveProposalsQueue(ctx, ctx.BlockHeader().Time, func(proposal govtypes.Proposal) bool { diff --git a/x/ccv/provider/keeper/proposal.go b/x/ccv/provider/keeper/proposal.go index 606ca6010f..546990b509 100644 --- a/x/ccv/provider/keeper/proposal.go +++ b/x/ccv/provider/keeper/proposal.go @@ -309,8 +309,6 @@ func (k Keeper) PendingConsumerAdditionPropIterator(ctx sdk.Context) sdk.Iterato return sdk.KVStorePrefixIterator(store, []byte{types.PendingCAPBytePrefix}) } -// TODO: add events -// - emit props to execute // BeginBlockInit iterates over the pending consumer addition proposals in order, and creates // clients for props in which the spawn time has passed. Executed proposals are deleted. // @@ -431,8 +429,6 @@ func (k Keeper) PendingConsumerRemovalPropIterator(ctx sdk.Context) sdk.Iterator return sdk.KVStorePrefixIterator(store, []byte{types.PendingCRPBytePrefix}) } -// TODO: add events -// - emit removal props that will be executed // BeginBlockCCR iterates over the pending consumer removal proposals // in order and stop/removes the chain if the stop time has passed, // otherwise it will break out of loop and return. Executed proposals are deleted. diff --git a/x/ccv/provider/keeper/relay.go b/x/ccv/provider/keeper/relay.go index eed455c1f8..4791c2ffaa 100644 --- a/x/ccv/provider/keeper/relay.go +++ b/x/ccv/provider/keeper/relay.go @@ -120,9 +120,6 @@ func (k Keeper) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet) err return k.StopConsumerChain(ctx, chainID, k.GetLockUnbondingOnTimeout(ctx, chainID), false) } -// TODO: add events -// - emit matured unbonding ops -// - emit validator updates // EndBlockVSU contains the EndBlock logic needed for // the Validator Set Update sub-protocol func (k Keeper) EndBlockVSU(ctx sdk.Context) { @@ -205,8 +202,6 @@ func (k Keeper) SendPendingVSCPackets(ctx sdk.Context, chainID, channelID string } } -// TODO: add events -// - emit valupdateId and block height // EndBlockCIS contains the EndBlock logic needed for // the Consumer Initiated Slashing sub-protocol func (k Keeper) EndBlockCIS(ctx sdk.Context) { @@ -323,7 +318,6 @@ func (k Keeper) HandleSlashPacket(ctx sdk.Context, chainID string, data ccv.Slas return true, nil } -// TODO: emit removed chain ids // EndBlockCIS contains the EndBlock logic needed for // the Consumer Chain Removal sub-protocol func (k Keeper) EndBlockCCR(ctx sdk.Context) {