keeper

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KICK_VOTING_POOL_CLEANUP_INTERVAL = 10000 //every 10000 blocks
)

Variables

This section is empty.

Functions

func FilteredPaginate added in v0.8.0

func FilteredPaginate(cdc codec.Codec,
	prefixStore storetypes.KVStore,
	storeType int,
	queryOwnerAddr sdk.AccAddress,
	pageRequest *pagiquery.PageRequest,
	onResult func(key []byte, value []byte, accumulate bool) (bool, error),
) (*pagiquery.PageResponse, error)

storeType : 0-metaNode, 1-resourceNode

func GetIterator added in v0.8.0

func GetIterator(prefixStore storetypes.KVStore, start []byte, reverse bool) db.Iterator

func NewMsgServerImpl added in v0.8.0

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the bank MsgServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper of the register store

func NewKeeper

func NewKeeper(
	cdc codec.Codec,
	key storetypes.StoreKey,
	accountKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	distrKeeper types.DistrKeeper,
	authority string,
) Keeper

NewKeeper creates a register keeper

func (Keeper) AddMetaNodeDeposit added in v0.10.0

func (k Keeper) AddMetaNodeDeposit(ctx sdk.Context, metaNode types.MetaNode, tokenToAdd sdk.Coin,
) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdkmath.Int, err error)

AddMetaNodeDeposit Update the tokens of an existing meta node

func (Keeper) AddMetaNodeToBitMapIdxCache added in v0.10.0

func (k Keeper) AddMetaNodeToBitMapIdxCache(networkAddr stratos.SdsAddress)

func (Keeper) AddResourceNodeDeposit added in v0.10.0

func (k Keeper) AddResourceNodeDeposit(ctx sdk.Context, resourceNode types.ResourceNode, tokenToAdd sdk.Coin,
) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdkmath.Int, err error)

AddResourceNodeDeposit Update the tokens of an existing resource node

func (Keeper) AfterNodeBeginUnbonding added in v0.4.0

func (k Keeper) AfterNodeBeginUnbonding(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool)

AfterNodeBeginUnbonding - call hook if registered

func (Keeper) AfterNodeBonded added in v0.4.0

func (k Keeper) AfterNodeBonded(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool)

AfterNodeBonded - call hook if registered

func (Keeper) AfterNodeCreated added in v0.4.0

func (k Keeper) AfterNodeCreated(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool)

AfterNodeCreated - call hook if registered

func (Keeper) AfterNodeRemoved added in v0.4.0

func (k Keeper) AfterNodeRemoved(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool)

AfterNodeRemoved - call hook if registered

func (Keeper) BeforeNodeModified added in v0.4.0

func (k Keeper) BeforeNodeModified(ctx sdk.Context, network stratos.SdsAddress, isMetaNode bool)

BeforeNodeModified - call hook if registered

func (Keeper) BlockRegisteredNodesUpdates added in v0.4.0

func (k Keeper) BlockRegisteredNodesUpdates(ctx sdk.Context)

BlockRegisteredNodesUpdates Called in each EndBlock

func (Keeper) BondDenom

func (k Keeper) BondDenom(ctx sdk.Context) (res string)

BondDenom - Bondable coin denomination

func (*Keeper) CalculatePurchaseAmount added in v0.10.0

func (k *Keeper) CalculatePurchaseAmount(ctx sdk.Context, amount sdkmath.Int) (sdkmath.Int, sdkmath.Int, error)

func (Keeper) DecreaseOzoneLimitBySubtractDeposit added in v0.10.0

func (k Keeper) DecreaseOzoneLimitBySubtractDeposit(ctx sdk.Context, deposit sdkmath.Int) (ozoneLimitChange sdkmath.Int)

func (Keeper) DeductSlashing added in v0.7.0

func (k Keeper) DeductSlashing(ctx sdk.Context, walletAddress sdk.AccAddress, coins sdk.Coins, slashingDenom string) (remaining, deducted sdk.Coins)

DeductSlashing deduct slashing amount from coins, return the coins that after deduction

func (Keeper) DeleteKickMetaNodeVotePool added in v0.12.0

func (k Keeper) DeleteKickMetaNodeVotePool(ctx sdk.Context, targetNetworkAddr stratos.SdsAddress)

func (Keeper) DeleteMetaNodeRegistrationVotePool added in v0.10.0

func (k Keeper) DeleteMetaNodeRegistrationVotePool(ctx sdk.Context, nodeAddr stratos.SdsAddress)

func (Keeper) DequeueAllMatureUBDQueue added in v0.4.0

func (k Keeper) DequeueAllMatureUBDQueue(ctx sdk.Context, currTime time.Time) (matureUnbonds []string)

DequeueAllMatureUBDQueue returns a concatenated list of all the timeslices inclusively previous to currTime, and deletes the timeslices from the queue Iteration for dequeuing all mature unbonding queue TODO: Unused parameter: currTime

func (Keeper) ExportGenesis added in v0.12.0

func (k Keeper) ExportGenesis(ctx sdk.Context) (data *types.GenesisState)

ExportGenesis writes the current store values to a genesis file, which can be imported again with InitGenesis

func (Keeper) GetAllActiveMetaNodes added in v0.12.0

func (k Keeper) GetAllActiveMetaNodes(ctx sdk.Context) (metaNodes []types.MetaNode)

GetAllActiveMetaNodes get the set of all bonded & not suspended meta nodes

func (Keeper) GetAllExpiredKickMetaNodeVotePool added in v0.12.0

func (k Keeper) GetAllExpiredKickMetaNodeVotePool(ctx sdk.Context) (votePools []types.KickMetaNodeVotePool)

func (Keeper) GetAllKickMetaNodeVotePool added in v0.12.0

func (k Keeper) GetAllKickMetaNodeVotePool(ctx sdk.Context) (votePools []types.KickMetaNodeVotePool)

func (Keeper) GetAllMetaNodeRegVotePool added in v0.12.0

func (k Keeper) GetAllMetaNodeRegVotePool(ctx sdk.Context) (votePools []types.MetaNodeRegistrationVotePool)

func (Keeper) GetAllMetaNodes added in v0.8.0

func (k Keeper) GetAllMetaNodes(ctx sdk.Context) (metaNodes types.MetaNodes)

GetAllMetaNodes get the set of all meta nodes with no limits, used during genesis dump Iteration for all meta nodes

func (Keeper) GetAllResourceNodes

func (k Keeper) GetAllResourceNodes(ctx sdk.Context) (resourceNodes types.ResourceNodes)

GetAllResourceNodes get the set of all resource nodes with no limits, used during genesis dump Iteration for all resource nodes

func (Keeper) GetAllUnbondingNode added in v0.12.0

func (k Keeper) GetAllUnbondingNode(ctx sdk.Context) (unbondingNodes []types.UnbondingNode)

func (Keeper) GetAllUnbondingNodesTotalBalance added in v0.4.0

func (k Keeper) GetAllUnbondingNodesTotalBalance(ctx sdk.Context) sdkmath.Int

GetAllUnbondingNodesTotalBalance Iteration for getting the total balance of all unbonding nodes

func (Keeper) GetBankKeeper added in v0.10.0

func (k Keeper) GetBankKeeper() types.BankKeeper

func (Keeper) GetBondedMetaNodeCnt added in v0.8.0

func (k Keeper) GetBondedMetaNodeCnt(ctx sdk.Context) (balance sdkmath.Int)

func (Keeper) GetBondedResourceNodeCnt added in v0.8.0

func (k Keeper) GetBondedResourceNodeCnt(ctx sdk.Context) (balance sdkmath.Int)

func (Keeper) GetCurrNozPriceParams added in v0.11.0

func (k Keeper) GetCurrNozPriceParams(ctx sdk.Context) (St, Pt, Lt sdkmath.Int)

GetCurrNozPriceParams calcs current noz price

func (Keeper) GetDepositInfoByMetaNode added in v0.12.0

func (k Keeper) GetDepositInfoByMetaNode(ctx sdk.Context, node types.MetaNode) (types.DepositInfo, error)

func (Keeper) GetDepositInfoByResourceNode added in v0.12.0

func (k Keeper) GetDepositInfoByResourceNode(ctx sdk.Context, node types.ResourceNode) (types.DepositInfo, error)

func (Keeper) GetDepositInfosByMetaNodes added in v0.12.0

func (k Keeper) GetDepositInfosByMetaNodes(
	ctx sdk.Context, metaNodes types.MetaNodes,
) ([]*types.DepositInfo, error)

GetDepositInfosByMetaNodes Iteration for querying DepositInfos of meta nodes by owner(grpc)

func (Keeper) GetDepositInfosByResourceNodes added in v0.12.0

func (k Keeper) GetDepositInfosByResourceNodes(
	ctx sdk.Context, resourceNodes types.ResourceNodes,
) ([]*types.DepositInfo, error)

GetDepositInfosByResourceNodes Iteration for querying DepositInfos of resource nodes by owner(grpc)

func (Keeper) GetDepositNozRate added in v0.10.0

func (k Keeper) GetDepositNozRate(ctx sdk.Context) (depositNozRate sdkmath.LegacyDec)

func (Keeper) GetEffectiveTotalDeposit added in v0.10.0

func (k Keeper) GetEffectiveTotalDeposit(ctx sdk.Context) (deposit sdkmath.Int)

func (Keeper) GetInitialGenesisDepositTotal added in v0.10.0

func (k Keeper) GetInitialGenesisDepositTotal(ctx sdk.Context) (deposit sdkmath.Int)

deprecated

func (Keeper) GetKickMetaNodeVotePool added in v0.12.0

func (k Keeper) GetKickMetaNodeVotePool(ctx sdk.Context, targetNetworkAddr stratos.SdsAddress) (votePool types.KickMetaNodeVotePool, found bool)

func (Keeper) GetMetaNode added in v0.8.0

func (k Keeper) GetMetaNode(ctx sdk.Context, p2pAddress stratos.SdsAddress) (metaNode types.MetaNode, found bool)

GetMetaNode get a single meta node

func (Keeper) GetMetaNodeBitMapIndex added in v0.10.0

func (k Keeper) GetMetaNodeBitMapIndex(ctx sdk.Context, networkAddr stratos.SdsAddress) (index int, err error)

func (Keeper) GetMetaNodeBondedToken added in v0.8.0

func (k Keeper) GetMetaNodeBondedToken(ctx sdk.Context) (token sdk.Coin)

func (Keeper) GetMetaNodeIterator added in v0.8.0

func (k Keeper) GetMetaNodeIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) GetMetaNodeNotBondedToken added in v0.8.0

func (k Keeper) GetMetaNodeNotBondedToken(ctx sdk.Context) (token sdk.Coin)

func (Keeper) GetMetaNodeRegistrationVotePool added in v0.8.0

func (k Keeper) GetMetaNodeRegistrationVotePool(ctx sdk.Context, nodeAddr stratos.SdsAddress) (votePool types.MetaNodeRegistrationVotePool, found bool)

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)

GetParams returns the params from the store

func (*Keeper) GetPrepayParams added in v0.11.0

func (k *Keeper) GetPrepayParams(ctx sdk.Context) (St, Pt, Lt sdkmath.Int)

func (Keeper) GetRemainingOzoneLimit

func (k Keeper) GetRemainingOzoneLimit(ctx sdk.Context) (value sdkmath.Int)

func (Keeper) GetResourceNode

func (k Keeper) GetResourceNode(ctx sdk.Context, p2pAddress stratos.SdsAddress) (resourceNode types.ResourceNode, found bool)

GetResourceNode get a single resource node

func (Keeper) GetResourceNodeBondedToken added in v0.4.0

func (k Keeper) GetResourceNodeBondedToken(ctx sdk.Context) (token sdk.Coin)

func (Keeper) GetResourceNodeIterator added in v0.8.0

func (k Keeper) GetResourceNodeIterator(ctx sdk.Context) sdk.Iterator

func (Keeper) GetResourceNodeNotBondedToken added in v0.4.0

func (k Keeper) GetResourceNodeNotBondedToken(ctx sdk.Context) (token sdk.Coin)

func (Keeper) GetSlashing added in v0.7.0

func (k Keeper) GetSlashing(ctx sdk.Context, walletAddress sdk.AccAddress) (res sdkmath.Int)

func (Keeper) GetTotalUnissuedPrepay added in v0.6.2

func (k Keeper) GetTotalUnissuedPrepay(ctx sdk.Context) (totalUnissuedPrepay sdk.Coin)

func (Keeper) GetUnbondingNode added in v0.4.0

func (k Keeper) GetUnbondingNode(ctx sdk.Context, networkAddr stratos.SdsAddress) (ubd types.UnbondingNode, found bool)

GetUnbondingNode return a unbonding node

func (Keeper) GetUnbondingNodeBalance added in v0.4.0

func (k Keeper) GetUnbondingNodeBalance(ctx sdk.Context, networkAddr stratos.SdsAddress) sdkmath.Int

GetUnbondingNodeBalance returns an unbonding balance and an UnbondingNode

func (Keeper) GetUnbondingNodeQueueTimeSlice added in v0.4.0

func (k Keeper) GetUnbondingNodeQueueTimeSlice(ctx sdk.Context, timestamp time.Time) (networkAddrs []string)

GetUnbondingNodeQueueTimeSlice gets a specific unbonding queue timeslice. A timeslice is a slice of DVPairs corresponding to unbonding delegations that expire at a certain time.

func (Keeper) HandleVoteForKickMetaNode added in v0.12.0

func (k Keeper) HandleVoteForKickMetaNode(ctx sdk.Context, targetNetworkAddr stratos.SdsAddress,
	opinion types.VoteOpinion, voterNetworkAddr stratos.SdsAddress, voterOwnerAddr sdk.AccAddress) (
	nodeStatus stakingtypes.BondStatus, ozoneLimitChange sdkmath.Int, depositToRemove sdk.Coin, unbondingMatureTime time.Time, err error)

Active meta node kick other meta node

func (Keeper) HandleVoteForMetaNodeRegistration added in v0.8.0

func (k Keeper) HandleVoteForMetaNodeRegistration(ctx sdk.Context, candidateNetworkAddr stratos.SdsAddress, candidateOwnerAddr sdk.AccAddress,
	opinion types.VoteOpinion, voterNetworkAddr stratos.SdsAddress, voterOwnerAddr sdk.AccAddress) (
	ozoneLimitChange sdkmath.Int, nodeStatus stakingtypes.BondStatus, err error)

func (Keeper) HasMaxUnbondingNodeEntries added in v0.4.0

func (k Keeper) HasMaxUnbondingNodeEntries(ctx sdk.Context, networkAddr stratos.SdsAddress) bool

HasMaxUnbondingNodeEntries - check if unbonding node has maximum number of entries

func (Keeper) IncreaseOzoneLimitByAddDeposit added in v0.10.0

func (k Keeper) IncreaseOzoneLimitByAddDeposit(ctx sdk.Context, deposit sdkmath.Int) (ozoneLimitChange sdkmath.Int)

func (Keeper) InitGenesis added in v0.12.0

func (k Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState)

InitGenesis initialize default parameters and the keeper's address to pubkey map

func (Keeper) InsertUnbondingNodeQueue added in v0.4.0

func (k Keeper) InsertUnbondingNodeQueue(ctx sdk.Context, ubd types.UnbondingNode, completionTime time.Time)

InsertUnbondingNodeQueue inserts an unbonding delegation to the appropriate timeslice in the unbonding queue

func (Keeper) IsUnbondable added in v0.10.0

func (k Keeper) IsUnbondable(ctx sdk.Context, unbondAmt sdkmath.Int) bool

func (Keeper) IteratorSlashingInfo added in v0.7.0

func (k Keeper) IteratorSlashingInfo(ctx sdk.Context, handler func(walletAddress sdk.AccAddress, slashing sdkmath.Int) (stop bool))

IteratorSlashingInfo Iteration for each slashing

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) MaxEntries added in v0.4.0

func (k Keeper) MaxEntries(ctx sdk.Context) (res uint32)

MaxEntries - Maximum number of simultaneous unbonding delegations or redelegations (per pair/trio)

func (Keeper) OwnActivateMetaNode added in v0.12.0

func (k Keeper) OwnActivateMetaNode(ctx sdk.Context, ownerAddr sdk.AccAddress, p2pAddr stratos.SdsAddress) bool

func (Keeper) OwnMetaNode added in v0.10.0

func (k Keeper) OwnMetaNode(ctx sdk.Context, ownerAddr sdk.AccAddress, p2pAddr stratos.SdsAddress) bool

func (Keeper) RegisterMetaNode added in v0.8.0

func (k Keeper) RegisterMetaNode(ctx sdk.Context, networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ownerAddr sdk.AccAddress,
	beneficiaryAddress sdk.AccAddress, description types.Description, deposit sdk.Coin) error

func (Keeper) RegisterResourceNode

func (k Keeper) RegisterResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddress, pubKey cryptotypes.PubKey, ownerAddr sdk.AccAddress,
	beneficiaryAddress sdk.AccAddress, description types.Description, nodeType types.NodeType, deposit sdk.Coin,
) (ozoneLimitChange sdkmath.Int, err error)

func (Keeper) ReloadMetaNodeBitMapIdxCache added in v0.10.0

func (k Keeper) ReloadMetaNodeBitMapIdxCache(ctx sdk.Context)

func (Keeper) RemoveExpiredKickMetaNodeVotePool added in v0.12.0

func (k Keeper) RemoveExpiredKickMetaNodeVotePool(ctx sdk.Context)

delete all expired vote pool data to allow the next round of voting

func (Keeper) RemoveMetaNodeFromBitMapIdxCache added in v0.10.0

func (k Keeper) RemoveMetaNodeFromBitMapIdxCache(networkAddr stratos.SdsAddress)

func (Keeper) RemoveTokenFromPoolWhileUnbondingMetaNode added in v0.8.0

func (k Keeper) RemoveTokenFromPoolWhileUnbondingMetaNode(ctx sdk.Context, tokenToSub sdk.Coin) error

func (Keeper) RemoveTokenFromPoolWhileUnbondingResourceNode added in v0.4.0

func (k Keeper) RemoveTokenFromPoolWhileUnbondingResourceNode(ctx sdk.Context, resourceNode types.ResourceNode, tokenToSub sdk.Coin) error

func (Keeper) RemoveUnbondingNode added in v0.4.0

func (k Keeper) RemoveUnbondingNode(ctx sdk.Context, networkAddr stratos.SdsAddress)

RemoveUnbondingNode removes the unbonding node object

func (Keeper) ResourceNodeMinDeposit added in v0.10.0

func (k Keeper) ResourceNodeMinDeposit(ctx sdk.Context) (res sdk.Coin)

func (Keeper) ResourceNodeRegEnabled added in v0.9.0

func (k Keeper) ResourceNodeRegEnabled(ctx sdk.Context) (res bool)

func (Keeper) SetBondedMetaNodeCnt added in v0.8.0

func (k Keeper) SetBondedMetaNodeCnt(ctx sdk.Context, count sdkmath.Int)

func (Keeper) SetBondedResourceNodeCnt added in v0.8.0

func (k Keeper) SetBondedResourceNodeCnt(ctx sdk.Context, count sdkmath.Int)

func (Keeper) SetDepositNozRate added in v0.10.0

func (k Keeper) SetDepositNozRate(ctx sdk.Context, depositNozRate sdkmath.LegacyDec)

func (Keeper) SetEffectiveTotalDeposit added in v0.10.0

func (k Keeper) SetEffectiveTotalDeposit(ctx sdk.Context, deposit sdkmath.Int)

func (Keeper) SetHooks added in v0.4.0

func (k Keeper) SetHooks(sh types.RegisterHooks) Keeper

SetHooks Set the register hooks

func (Keeper) SetInitialGenesisDepositTotal added in v0.10.0

func (k Keeper) SetInitialGenesisDepositTotal(ctx sdk.Context, deposit sdkmath.Int)

deprecated

func (Keeper) SetKickMetaNodeVotePool added in v0.12.0

func (k Keeper) SetKickMetaNodeVotePool(ctx sdk.Context, votePool types.KickMetaNodeVotePool)

func (Keeper) SetMetaNode added in v0.8.0

func (k Keeper) SetMetaNode(ctx sdk.Context, metaNode types.MetaNode)

SetMetaNode sets the main record holding meta node details

func (Keeper) SetMetaNodeRegistrationVotePool added in v0.8.0

func (k Keeper) SetMetaNodeRegistrationVotePool(ctx sdk.Context, votePool types.MetaNodeRegistrationVotePool)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error

SetParams sets the params on the store

func (Keeper) SetRemainingOzoneLimit

func (k Keeper) SetRemainingOzoneLimit(ctx sdk.Context, value sdkmath.Int)

func (Keeper) SetResourceNode

func (k Keeper) SetResourceNode(ctx sdk.Context, resourceNode types.ResourceNode)

SetResourceNode sets the main record holding resource node details

func (Keeper) SetSlashing added in v0.7.0

func (k Keeper) SetSlashing(ctx sdk.Context, walletAddress sdk.AccAddress, slashing sdkmath.Int)

func (Keeper) SetUnbondingNode added in v0.4.0

func (k Keeper) SetUnbondingNode(ctx sdk.Context, ubd types.UnbondingNode)

SetUnbondingNode sets the unbonding node

func (Keeper) SetUnbondingNodeEntry added in v0.4.0

func (k Keeper) SetUnbondingNodeEntry(ctx sdk.Context, networkAddr stratos.SdsAddress, isMetaNode bool,
	creationHeight int64, minTime time.Time, balance sdkmath.Int) types.UnbondingNode

SetUnbondingNodeEntry adds an entry to the unbonding MetaNode at the given addresses. It creates the unbonding MetaNode if it does not exist

func (Keeper) SetUnbondingNodeQueueTimeSlice added in v0.4.0

func (k Keeper) SetUnbondingNodeQueueTimeSlice(ctx sdk.Context, timestamp time.Time, networkAddrs []string)

SetUnbondingNodeQueueTimeSlice sets a specific unbonding queue timeslice.

func (Keeper) SubtractMetaNodeDeposit added in v0.10.0

func (k Keeper) SubtractMetaNodeDeposit(ctx sdk.Context, metaNode types.MetaNode, tokenToSub sdk.Coin) error

SubtractMetaNodeDeposit Update the tokens of an existing meta node

func (Keeper) SubtractResourceNodeDeposit added in v0.10.0

func (k Keeper) SubtractResourceNodeDeposit(ctx sdk.Context, resourceNode types.ResourceNode, tokenToSub sdk.Coin) error

SubtractResourceNodeDeposit Update the tokens of an existing resource node

func (Keeper) UnbondMetaNode added in v0.8.0

func (k Keeper) UnbondMetaNode(ctx sdk.Context, p2pAddress stratos.SdsAddress, ownerAddress sdk.AccAddress,
) (ozoneLimitChange sdkmath.Int, depositToRemove sdk.Coin, unbondingMatureTime time.Time, err error)

Remove all deposit from meta-node, start unbonding process

func (Keeper) UnbondResourceNode added in v0.4.0

func (k Keeper) UnbondResourceNode(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress,
) (depositToRemove sdk.Coin, unbondingMatureTime time.Time, err error)

UnbondResourceNode Unbond all tokens of resource node

func (Keeper) UnbondingCompletionTime added in v0.4.0

func (k Keeper) UnbondingCompletionTime(ctx sdk.Context) (res time.Duration)

func (Keeper) UnbondingNodeQueueIterator added in v0.4.0

func (k Keeper) UnbondingNodeQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator

UnbondingNodeQueueIterator returns all the unbonding queue timeslices from time 0 until endTime

func (Keeper) UnbondingThreasholdTime added in v0.4.0

func (k Keeper) UnbondingThreasholdTime(ctx sdk.Context) (res time.Duration)

func (Keeper) UpdateEffectiveDeposit added in v0.10.0

func (k Keeper) UpdateEffectiveDeposit(ctx sdk.Context, networkAddr stratos.SdsAddress, effectiveDepositAfter sdkmath.Int) (
	ozoneLimitChange, effectiveDepositChange sdkmath.Int, isUnsuspendedDuringUpdate bool, err error)

func (Keeper) UpdateMetaNode added in v0.8.0

func (k Keeper) UpdateMetaNode(ctx sdk.Context, description types.Description,
	networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, beneficiaryAddr sdk.AccAddress) error

func (Keeper) UpdateMetaNodeBitMapIdxCache added in v0.10.0

func (k Keeper) UpdateMetaNodeBitMapIdxCache(ctx sdk.Context)

func (Keeper) UpdateMetaNodeDeposit added in v0.10.0

func (k Keeper) UpdateMetaNodeDeposit(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, depositDelta sdk.Coin) (
	ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdkmath.Int, unbondingMatureTime time.Time, metaNode types.MetaNode, err error)

func (Keeper) UpdateResourceNode added in v0.4.0

func (k Keeper) UpdateResourceNode(ctx sdk.Context, description types.Description, nodeType types.NodeType,
	networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, beneficiaryAddr sdk.AccAddress) error

func (Keeper) UpdateResourceNodeDeposit added in v0.10.0

func (k Keeper) UpdateResourceNodeDeposit(ctx sdk.Context, networkAddr stratos.SdsAddress, ownerAddr sdk.AccAddress, depositDelta sdk.Coin) (
	ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdkmath.Int, completionTime time.Time, resourcenode types.ResourceNode, err error)

UpdateResourceNodeDeposit Add deposit only

func (Keeper) VotingPeriod added in v0.10.0

func (k Keeper) VotingPeriod(ctx sdk.Context) (res time.Duration)

type Migrator added in v0.8.0

type Migrator struct {
	// contains filtered or unexported fields
}

Migrator is a struct for handling in-place store migrations.

func NewMigrator added in v0.8.0

func NewMigrator(keeper Keeper, legacySubspace types.ParamsSubspace) Migrator

NewMigrator returns a new Migrator.

func (Migrator) Migrate1to2 added in v0.8.0

func (m Migrator) Migrate1to2(ctx sdk.Context) error

Migrate1to2 migrates from version 1 to 2.

type Querier added in v0.8.0

type Querier struct {
	Keeper
}

Querier is used as Keeper will have duplicate methods if used directly, and gRPC names take precedence over keeper

func (Querier) BondedMetaNodeCount added in v0.8.0

func (Querier) DepositByNode added in v0.10.0

func (Querier) DepositByOwner added in v0.10.0

func (Querier) DepositTotal added in v0.10.0

func (Querier) MetaNode added in v0.8.0

func (Querier) Params added in v0.8.0

func (Querier) RemainingOzoneLimit added in v0.12.0

func (Querier) ResourceNode added in v0.8.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL