keeper

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryResourceNodeByNetworkAddr = "resource-node"
	QueryMetaNodeByNetworkAddr     = "meta_node"
	QueryNodesDepositTotal         = "nodes_deposit_total"
	QueryNodeDepositByNodeAddr     = "node_deposit_by_addr"
	QueryNodeDepositByOwner        = "node_deposit_by_owner"
	QueryRegisterParams            = "register_params"
	QueryResourceNodesCount        = "resource_nodes_count"
	QueryMetaNodesCount            = "meta_nodes_count"
)

Variables

This section is empty.

Functions

func CheckAccAddr added in v0.4.0

func CheckAccAddr(w http.ResponseWriter, r *http.Request, data string) (sdk.AccAddress, bool)

func CheckSdsAddr added in v0.7.0

func CheckSdsAddr(w http.ResponseWriter, r *http.Request, data string) (stratos.SdsAddress, bool)

func DepositInfosMetaNodes added in v0.10.0

func DepositInfosMetaNodes(
	ctx sdk.Context, k Keeper, metaNodes types.MetaNodes,
) (types.DepositInfos, error)

DepositInfosMetaNodes Iteration for querying DepositInfos of meta nodes by owner(cmd and rest)

func DepositInfosResourceNodes added in v0.10.0

func DepositInfosResourceNodes(
	ctx sdk.Context, k Keeper, resourceNodes types.ResourceNodes,
) (types.DepositInfos, error)

DepositInfosResourceNodes Iteration for querying DepositInfos of resource nodes by owner(cmd and rest)

func FilteredPaginate added in v0.8.0

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

func GetDepositInfoByMetaNode added in v0.10.0

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

func GetDepositInfoByResourceNode added in v0.10.0

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

func GetDepositInfosByMetaNodes added in v0.10.0

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

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

func GetDepositInfosByResourceNodes added in v0.10.0

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

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

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.

func NewQuerier

func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier

NewQuerier creates a new querier for register clients.

Types

type Keeper

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

Keeper of the register store

func NewKeeper

func NewKeeper(cdc codec.Codec, key sdk.StoreKey, paramSpace paramtypes.Subspace,
	accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, distrKeeper types.DistrKeeper) 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 sdk.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 sdk.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)

Called in each EndBlock

func (Keeper) BondDenom

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

BondDenom - Bondable coin denomination

func (Keeper) CompleteUnbondingWithAmount added in v0.4.0

func (k Keeper) CompleteUnbondingWithAmount(ctx sdk.Context, networkAddrBech32 string) (sdk.Coins, bool, error)

CompleteUnbondingWithAmount completes the unbonding of all mature entries in the retrieved unbonding delegation object and returns the total unbonding balance or an error upon failure.

func (Keeper) DecreaseOzoneLimitBySubtractDeposit added in v0.10.0

func (k Keeper) DecreaseOzoneLimitBySubtractDeposit(ctx sdk.Context, deposit sdk.Int) (ozoneLimitChange sdk.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) 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) 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) GetAllUnbondingNodesTotalBalance added in v0.4.0

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

GetAllUnbondingNodesTotalBalance Iteration for getting the total balance of all unbonding nodes

func (Keeper) GetAllValidMetaNodes added in v0.8.0

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

GetAllValidMetaNodes get the set of all bonded & not suspended meta 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 sdk.Int)

func (Keeper) GetBondedResourceNodeCnt added in v0.8.0

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

func (Keeper) GetCurrNozPriceParams added in v0.11.0

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

GetCurrNozPriceParams calcs current noz price

func (Keeper) GetDepositNozRate added in v0.10.0

func (k Keeper) GetDepositNozRate(ctx sdk.Context) (depositNozRate sdk.Dec)

func (Keeper) GetEffectiveTotalDeposit added in v0.10.0

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

func (Keeper) GetInitialGenesisDepositTotal added in v0.10.0

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

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) GetMetaNodeList added in v0.8.0

func (k Keeper) GetMetaNodeList(ctx sdk.Context, networkAddr stratos.SdsAddress) (metaNodes []types.MetaNode, err error)

getMetaNodeList get all meta nodes by networkAddr

func (Keeper) GetMetaNodeListByMoniker added in v0.8.0

func (k Keeper) GetMetaNodeListByMoniker(ctx sdk.Context, moniker string) (resourceNodes []types.MetaNode, err error)

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) (params types.Params)

GetParams returns the total set of register parameters.

func (*Keeper) GetPrepayParams added in v0.11.0

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

func (Keeper) GetRemainingOzoneLimit

func (k Keeper) GetRemainingOzoneLimit(ctx sdk.Context) (value sdk.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 sdk.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) sdk.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) 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) (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 sdk.Int) (ozoneLimitChange sdk.Int)

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 sdk.Int) bool

func (Keeper) IteratorSlashingInfo added in v0.7.0

func (k Keeper) IteratorSlashingInfo(ctx sdk.Context, handler func(walletAddress sdk.AccAddress, slashing sdk.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) 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,
	description types.Description, deposit sdk.Coin) (ozoneLimitChange sdk.Int, err error)

func (Keeper) RegisterResourceNode

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

func (Keeper) ReloadMetaNodeBitMapIdxCache added in v0.10.0

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

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, metaNode types.MetaNode, tokenToSub sdk.Coin) error

TODO: Unused parameter: metaNode

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)

ResourceNodeRegEnabled

func (Keeper) SetBondedMetaNodeCnt added in v0.8.0

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

func (Keeper) SetBondedResourceNodeCnt added in v0.8.0

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

func (Keeper) SetDepositNozRate added in v0.10.0

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

func (Keeper) SetEffectiveTotalDeposit added in v0.10.0

func (k Keeper) SetEffectiveTotalDeposit(ctx sdk.Context, deposit sdk.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 sdk.Int)

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)

SetParams sets the register parameters to the param space.

func (Keeper) SetRemainingOzoneLimit

func (k Keeper) SetRemainingOzoneLimit(ctx sdk.Context, value sdk.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 sdk.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 sdk.Int) types.UnbondingNode

SetUnbondingMetaNodeEntry 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, metaNode types.MetaNode, amt sdk.Int,
) (ozoneLimitChange, availableTokenAmtBefore, availableTokenAmtAfter sdk.Int, unbondingMatureTime time.Time, err error)

func (Keeper) UnbondResourceNode added in v0.4.0

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

Unbond all tokens of resource node

func (Keeper) UnbondingCompletionTime added in v0.4.0

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

UnbondingCompletionTime

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)

UnbondingThreasholdTime

func (Keeper) UpdateEffectiveDeposit added in v0.10.0

func (k Keeper) UpdateEffectiveDeposit(ctx sdk.Context, networkAddr stratos.SdsAddress, effectiveDepositAfter sdk.Int) (
	ozoneLimitChange, effectiveDepositChange sdk.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) 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 sdk.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) 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 sdk.Int, completionTime time.Time, resourcenode types.ResourceNode, err error)

Add deposit only

func (Keeper) VotingPeriod added in v0.10.0

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

VotingPeriod

func (Keeper) WithdrawMetaNodeRegistrationDeposit added in v0.10.0

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

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) 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) ResourceNode added in v0.8.0

Jump to

Keyboard shortcuts

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