forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
abci.go
21 lines (17 loc) · 774 Bytes
/
abci.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package capability
import (
"time"
"github.com/eligion/cosmos-sdk/telemetry"
sdk "github.com/eligion/cosmos-sdk/types"
"github.com/eligion/cosmos-sdk/x/capability/keeper"
"github.com/eligion/cosmos-sdk/x/capability/types"
)
// BeginBlocker will call InitMemStore to initialize the memory stores in the case
// that this is the first time the node is executing a block since restarting (wiping memory).
// In this case, the BeginBlocker method will reinitialize the memory stores locally, so that subsequent
// capability transactions will pass.
// Otherwise BeginBlocker performs a no-op.
func BeginBlocker(ctx sdk.Context, k keeper.Keeper) {
defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker)
k.InitMemStore(ctx)
}