docs: cache-wrapping and virtual store (#8102)
* docs: cache-wrapping and virtual store * Finish the docs update * Update docs/building-modules/msg-services.md Co-authored-by: Amaury <amaury.martiny@protonmail.com> * Update docs/building-modules/msg-services.md Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: Amaury <amaury.martiny@protonmail.com> Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
This commit is contained in:
co-authored by
Amaury
Aleksandr Bezobchuk
parent
46b697ca23
commit
e481f13ff3
@@ -15,9 +15,9 @@ func (keeper Keeper) SubmitProposal(ctx sdk.Context, content types.Content) (typ
|
||||
return types.Proposal{}, sdkerrors.Wrap(types.ErrNoProposalHandlerExists, content.ProposalRoute())
|
||||
}
|
||||
|
||||
// Execute the proposal content in a cache-wrapped context to validate the
|
||||
// actual parameter changes before the proposal proceeds through the
|
||||
// governance process. State is not persisted.
|
||||
// Execute the proposal content in a new context branch (with branched store)
|
||||
// to validate the actual parameter changes before the proposal proceeds
|
||||
// through the governance process. State is not persisted.
|
||||
cacheCtx, _ := ctx.CacheContext()
|
||||
handler := keeper.router.GetRoute(content.ProposalRoute())
|
||||
if err := handler(cacheCtx, content); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user