celestiaorg / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Other
19 stars 33 forks source link

Implement `ctx.IsPrepareProposal` and `ctx.IsProcessProposal` #417

Open rootulp opened 1 month ago

rootulp commented 1 month ago

Motivation

Discussion w/ @evan-forbes

Context

The SDK ctx has these methods:

https://github.com/celestiaorg/cosmos-sdk/blob/8c98dec8632ee91701b5676530c90292a6c193ee/types/context.go#L60-L61

Problem

The SDK ctx doesn't have methods to determine if the ctx is inside PrepareProposal or ProcessProposal

Proposal

Add methods for IsPrepareProposal and IsProcessProposal.