refactor(context): Pass EventManager to the context as an interface. (#14384)

This commit is contained in:
Devon Bear
2022-12-22 00:29:19 -05:00
committed by GitHub
parent f1ee974ec8
commit ebf1e86bdc
3 changed files with 14 additions and 2 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ type Context struct {
recheckTx bool // if recheckTx == true, then checkTx must also be true
minGasPrice DecCoins
consParams *tmproto.ConsensusParams
eventManager *EventManager
eventManager EventManagerI
priority int64 // The tx priority, only relevant in CheckTx
kvGasConfig storetypes.GasConfig
transientKVGasConfig storetypes.GasConfig
@@ -60,7 +60,7 @@ func (c Context) BlockGasMeter() GasMeter { return c.blockGas
func (c Context) IsCheckTx() bool { return c.checkTx }
func (c Context) IsReCheckTx() bool { return c.recheckTx }
func (c Context) MinGasPrices() DecCoins { return c.minGasPrice }
func (c Context) EventManager() *EventManager { return c.eventManager }
func (c Context) EventManager() EventManagerI { return c.eventManager }
func (c Context) Priority() int64 { return c.priority }
func (c Context) KVGasConfig() storetypes.GasConfig { return c.kvGasConfig }
func (c Context) TransientKVGasConfig() storetypes.GasConfig { return c.transientKVGasConfig }