github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/cosmos-sdk/x/staking/abci.go (about)

     1  package staking
     2  
     3  import (
     4  	abci "github.com/fibonacci-chain/fbc/libs/tendermint/abci/types"
     5  
     6  	sdk "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types"
     7  	"github.com/fibonacci-chain/fbc/libs/cosmos-sdk/x/staking/keeper"
     8  )
     9  
    10  // BeginBlocker will persist the current header and validator set as a historical entry
    11  // and prune the oldest entry based on the HistoricalEntries parameter
    12  func BeginBlocker(ctx sdk.Context, k keeper.Keeper) {
    13  	k.TrackHistoricalInfo(ctx)
    14  }
    15  
    16  // Called every block, update validator set
    17  func EndBlocker(ctx sdk.Context, k keeper.Keeper) []abci.ValidatorUpdate {
    18  	return k.BlockValidatorUpdates(ctx)
    19  }