-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
diff --git a/app/app.go b/app/app.go | ||
index c5190b3..1aaa765 100644 | ||
index 6e9d3a80..83b83274 100644 | ||
--- a/app/app.go | ||
+++ b/app/app.go | ||
@@ -1057,6 +1057,11 @@ func (app *App) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) { | ||
@@ -1144,6 +1144,10 @@ func (app *App) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error) { | ||
|
||
// EndBlocker application updates every end block | ||
func (app *App) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) { | ||
+ if ctx.BlockHeight()%10 == 0 { | ||
+ store := ctx.KVStore(app.keys["cronos"]) | ||
+ store.Set([]byte("hello"), []byte("world")) | ||
+ } | ||
+ | ||
return app.ModuleManager.EndBlock(ctx) | ||
} | ||
|
||
rsp, err := app.ModuleManager.EndBlock(ctx) | ||
if err := app.RefreshBlockList(ctx); err != nil { | ||
app.Logger().Error("failed to update blocklist", "error", err) |