pool using time and end block handler staking

This commit is contained in:
rigelrozanski
2018-04-05 13:17:32 -04:00
parent 7d31ba835a
commit ccb71a2afa
4 changed files with 34 additions and 19 deletions
+12
View File
@@ -5,6 +5,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/bank"
abci "github.com/tendermint/abci/types"
)
//nolint
@@ -35,6 +36,17 @@ func NewHandler(k Keeper, ck bank.CoinKeeper) sdk.Handler {
}
}
//_______________________________________________
// NewEndBlocker generates sdk.EndBlocker
// Performs tick functionality
func NewEndBlocker(k Keeper) sdk.EndBlocker {
return func(ctx sdk.Context, req abci.RequestEndBlock) (res abci.ResponseEndBlock) {
res.ValidatorUpdates = k.Tick(ctx)
return
}
}
//_____________________________________________________________________
// These functions assume everything has been authenticated,